WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
258129
REGRESSION(
264515@main
): [GStreamer] Use of WeakPtr for m_player in MediaPlayerPrivateGStreamer looks unsafe
https://bugs.webkit.org/show_bug.cgi?id=258129
Summary
REGRESSION(264515@main): [GStreamer] Use of WeakPtr for m_player in MediaPlay...
Michael Catanzaro
Reported
2023-06-15 07:02:02 PDT
Moving this from
bug #254954
. I'm not sure that changing m_player to be a WeakPtr is actually safe to do without auditing its usage further. For example, in MediaPlayerPrivateGStreamer::handleNeedContextMessage, we have: gst_structure_set(contextStructure, "player", G_TYPE_POINTER, m_player.get(), nullptr); gst_element_set_context(GST_ELEMENT(GST_MESSAGE_SRC(message)), context.get()); So now it's stored dereferenced for what I assume is the lifetime of this GstMessage, and the WeakPtr provides no protection against invalidation. So probably it's not safe to use WeakPtr. This should be looked at more closely.
Attachments
Add attachment
proposed patch, testcase, etc.
Philippe Normand
Comment 1
2023-06-15 07:49:56 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/15003
EWS
Comment 2
2023-06-16 03:02:14 PDT
Committed
265236@main
(1ddda51c8059): <
https://commits.webkit.org/265236@main
> Reviewed commits have been landed. Closing PR #15003 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2023-06-16 03:03:22 PDT
<
rdar://problem/110891059
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug