RESOLVED FIXED224209
[WPE][GTK] Null pointer dereference when child process exits immediately
https://bugs.webkit.org/show_bug.cgi?id=224209
Summary [WPE][GTK] Null pointer dereference when child process exits immediately
Michael Catanzaro
Reported 2021-04-05 14:52:29 PDT
In https://github.com/flathub/org.gnome.Epiphany/issues/21 we discovered that when the child process exits immediately after it is spawned, g_subprocess_get_identifier() will return nullptr. In this case, we should crash cleanly with SIGABRT via g_error(), rather than crashing with a null pointer dereference inside g_ascii_strtoll(). SIGABRT is much nicer than SIGSEGV and indicates that we really do want to crash here, whereas SIGSEGV is just a bug.
Attachments
Patch (2.46 KB, patch)
2021-04-05 14:55 PDT, Michael Catanzaro
no flags
Michael Catanzaro
Comment 1 2021-04-05 14:55:06 PDT
Michael Catanzaro
Comment 2 2021-04-06 08:33:26 PDT
The crashing test is TestWebsiteData -p /webkit/WebKitWebsiteData/configuration: ERROR:../../Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:220:void testWebsiteDataConfiguration(WebsiteDataTest*, gconstpointer): 'test->fetch(persistentCaches)' should be nullptr Bail out! ERROR:../../Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:220:void testWebsiteDataConfiguration(WebsiteDataTest*, gconstpointer): 'test->fetch(persistentCaches)' should be nullptr My patch causes this test to fail on EWS, but the test crashes for me locally in the same way without my change. I can only imagine what's going wrong with the website data....
Carlos Garcia Campos
Comment 3 2021-04-07 00:12:05 PDT
I think the api test failure is unrelated.
Michael Catanzaro
Comment 4 2021-04-07 06:05:19 PDT
Comment on attachment 425210 [details] Patch Let's find out, then....
EWS
Comment 5 2021-04-07 06:13:38 PDT
Committed r275605: <https://commits.webkit.org/r275605> All reviewed patches have been landed. Closing bug and clearing flags on attachment 425210 [details].
Note You need to log in before you can comment on or make changes to this bug.