RESOLVED FIXED 116682
Move posix_spawn onto a zero delay timer
https://bugs.webkit.org/show_bug.cgi?id=116682
Summary Move posix_spawn onto a zero delay timer
Gavin Barraclough
Reported 2013-05-23 10:52:39 PDT
Attachments
Fix (6.41 KB, patch)
2013-05-23 10:56 PDT, Gavin Barraclough
andersca: review+
Gavin Barraclough
Comment 1 2013-05-23 10:56:43 PDT
Gavin Barraclough
Comment 2 2013-05-23 11:02:46 PDT
Fixed in r150595
Geoffrey Garen
Comment 3 2013-05-23 11:27:24 PDT
Comment on attachment 202728 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=202728&action=review > Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:119 > + CFRunLoopTimerContext context = { 0, info, NULL, NULL, NULL }; > + CFRunLoopTimerRef timer = CFRunLoopTimerCreate(NULL, CFAbsoluteTimeGetCurrent(), 0, 0, 0, reexecCallBack, &context); > + CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, kCFRunLoopCommonModes); Aren't you leaking this timer?
Darin Adler
Comment 4 2013-05-23 11:31:46 PDT
Comment on attachment 202728 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=202728&action=review > Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:79 > + posix_spawnattr_destroy(&attr); I don’t understand our approach on memory allocation. We are deallocating this, but not info, info->environment, the strings in info->environment, or timer. Why deallocate anything? Why not deallocate everything?
Gavin Barraclough
Comment 5 2013-05-23 15:01:51 PDT
This code was already leaky – it always immediately calls posix_spawn with flags to perform an execv – so the process is going to be be completely replaced (or will exit).
Note You need to log in before you can comment on or make changes to this bug.