After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 347794 - Do not reset SIGSEGV handler when --gst-disable-segtrap is active
Do not reset SIGSEGV handler when --gst-disable-segtrap is active
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.8
Other Linux
: Normal normal
: 0.10.10
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-17 15:12 UTC by Michal Benes
Modified: 2006-07-17 17:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to disable SIGSEGV handler override (478 bytes, patch)
2006-07-17 15:14 UTC, Michal Benes
committed Details | Review

Description Michal Benes 2006-07-17 15:12:45 UTC
I am writing an application that has custom SIGSEGV handler. Unfortunately the function _gst_plugin_fault_handler_restore resets the handler to SIG_DFL, even if _gst_disable_segtrap == TRUE. Note that my pipe is builded automatically and therefore new plugins can be loaded anytime during the stream processing.

I propose that _gst_plugin_fault_handler_restore does nothing in the case that _gst_plugin_fault_handler_setup did not set the signal handler. Simple patch attached. More complex patch could use _gst_plugin_fault_handler_is_setup, but I am not sure what was the developers intention with this flag.

It would be also nice to have API for setting _gst_disable_segtrap = TRUE from the application.

Thanks Michal
Comment 1 Michal Benes 2006-07-17 15:14:37 UTC
Created attachment 69048 [details] [review]
Patch to disable SIGSEGV handler override
Comment 2 Wim Taymans 2006-07-17 17:40:42 UTC
Thanks. Also added methods to get/set current core behaviour.

        * docs/gst/gstreamer-sections.txt:
        * gst/gst.c: (gst_segtrap_is_enabled), (gst_segtrap_set_enabled):
        * gst/gst.h:
        * gst/gstplugin.c: (_gst_plugin_fault_handler_restore):
        Add two functions to check and change the SIGSEGV behaviour
        when loading plugins.
        Don't mess with the SIGSEGV handler when we were told not to.
        Fixes #347794.
        API: gst_segtrap_is_enabled
        API: gst_segtrap_set_enabled