ASan needs to have its dynamic library inserted using DYLD_INSERT_LIBRARIES. When an ASanified binary is loaded and notices that this hasn't been done, it re-execs the process with environment updated. We already do a re-exec in Development builds of WebKit processes, pretty much for the same reason. Getting two re-execs it very annoying in debugging, because the debugger stops on exec. So if you wait to attach to com.apple.WebKit.WebContent.Development, you need to hit continue twice when it launches.
Created attachment 244143 [details] proposed fix As a separate fix, we'll also need to insert the library into the main process in run-webkit-tests and in run-safari. Having an extra re-exec in secondary process is the more annoying problem, because various IPC timeouts can pass while one resumes the process.
Created attachment 244144 [details] proposed fix Better behavior for release builds in the theoretical case where ASan library name becomes different. It's not a big problem to re-exec in release build, because it's probably not being debugged. So it doesn't have to be fatal if we can't find the library.
Created attachment 244167 [details] proposed fix Structured it slightly nicer.
Attachment 244167 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm:97: One line control clauses should not use braces. [whitespace/braces] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Committed <http://trac.webkit.org/r178043>, build fix in <http://trac.webkit.org/r178044>.
<rdar://problem/19431848>