Changeset 275605 in webkit
- Timestamp:
- Apr 7, 2021 6:13:34 AM (3 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r275592 r275605 1 2021-04-07 Michael Catanzaro <mcatanzaro@gnome.org> 2 3 [WPE][GTK] Null pointer dereference when child process exits immediately 4 https://bugs.webkit.org/show_bug.cgi?id=224209 5 6 Reviewed by Carlos Garcia Campos. 7 8 We discovered that when the child process exits immediately after it is spawned, 9 g_subprocess_get_identifier() will return nullptr. In this case, we should crash cleanly 10 with SIGABRT via g_error(), rather than crashing with a null pointer dereference inside 11 g_ascii_strtoll(). SIGABRT is much nicer than SIGSEGV and indicates that we really do want 12 to crash here, whereas SIGSEGV is just a bug. 13 14 Also, let's be careful with our terminology in the existing error message here. Although 15 GSubprocess currently always forks, I'm working to make it use posix_spawn() instead, so 16 let's not claim that fork() has failed when it soon might not be used at all. 17 18 * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp: 19 (WebKit::ProcessLauncher::launchProcess): 20 1 21 2021-04-07 Jer Noble <jer.noble@apple.com> 2 22 -
trunk/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
r274676 r275605 185 185 186 186 if (!process.get()) 187 g_error("Unable to forka new child process: %s", error->message);187 g_error("Unable to spawn a new child process: %s", error->message); 188 188 189 189 const char* processIdStr = g_subprocess_get_identifier(process.get()); 190 if (!processIdStr) 191 g_error("Spawned process died immediately. This should not happen."); 192 190 193 m_processIdentifier = g_ascii_strtoll(processIdStr, nullptr, 0); 191 194 RELEASE_ASSERT(m_processIdentifier);
Note: See TracChangeset
for help on using the changeset viewer.