[Bug 761916] gstinfo: Make GST_DEBUG_PAD_NAME "MT crash safe"

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Feb 16 14:14:11 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=761916

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #321346|none                        |reviewed
             status|                            |

--- Comment #8 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 321346:
 --> (https://bugzilla.gnome.org/review?bug=761916&attachment=321346)

::: gst/gstinfo.h
@@ +234,3 @@
+
+  /* parent may be disposed, but accessing name will not crash */
+  name = GST_OBJECT_NAME (parent);

Why will this not crash? Maybe between getting the parent and this line here a
lot of other stuff happened in another thread, and dereferencing parent now
leads to a crash because the page is not owned by the process anymore?

And even otherwise, as you say it might contain garbage. Garbage that might not
contain any \0 until the end of the page, which again would cause a crash then.

I wouldn't call this MT safe still :) Even if it is better now.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list