From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winegstreamer/unixlib.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/winegstreamer/unixlib.c b/dlls/winegstreamer/unixlib.c index db9d1eb114f..2c3134f2959 100644 --- a/dlls/winegstreamer/unixlib.c +++ b/dlls/winegstreamer/unixlib.c @@ -253,6 +253,12 @@ NTSTATUS wg_init_gstreamer(void *arg) char **argv = args; GError *err;
+ /* GStreamer installs a temporary SEGV handler when it loads plugins + * to initialize its registry, this messes with a lot of things in + * Wine and we do not want that. + */ + gst_segtrap_set_enabled(false); + if (!gst_init_check(&argc, &argv, &err)) { fprintf(stderr, "winegstreamer: failed to initialize GStreamer: %s\n", err->message);
What specifically does this break? I don't immediately see how it can break anything; GStreamer does specifically restore our old signal handler afterwards.
It breaks some specific mechanism in Proton but otherwise also breaks anything else that may trigger a SEGV (*) while GStreamer is loading. Wine signal handlers *have* to stay installed at all time.
(*) on purpose, like plenty of anti-debug tricks, or not but still possibly expecting to be able to catch the exception.
That's for any thread working in parallel with gstreamer initialization. That's not only for apps doing something special, but Wine internal fault handling is also broken during that, just e. g., IsBadReadPtr.
Oh right, I forgot signal handlers don't have thread granularity :-/
Can we make the comment less vague? Instead of "this messes with a lot of things and we don't want that", something like "we need to make sure that signals from other threads reach our own signal handler".