> On Dec 15, 2015, at 9:36 AM, Nicolas B. Pierron > <nicolas.b.pier...@mozilla.com> wrote: > 2/ Current Blockers: > > 2.1/ Windows Clang ASan builds are not stable yet.
Have we considered doing this on Linux and Mac? Windows would probably be the last platform where we should try this, given that we build Nightly with a different toolchain. > Apparently we have a few issues opened against clang, and we should push > these forward to make sure that we can have a stable build. Part of the > stability issues might be related to the way our build system is working as > we are linking crt library both statically and dynamically inside Gecko. Asan on Windows doesn’t support static linking to the CRT at all. I thought that we stopped using static linking in bug 1194834. Is this still an issue? (I haven’t done one of these builds in quite a while so I don’t know for sure.) > It seems that part of the issue might be related to the fact that Clang > default to cl.exe when Clang fails at compiling, and a guess from Raymond was > that we have ABI issues caused by a miss conversion of the command line > arguments. I don’t think that would be a problem. In theory you should be able to link object files with and without ASan turned on into the same executable. I think this is the order in which we need to proceed: 1. Get clang-cl builds on the infrastructure. 2. Make sure that these builds run and don’t crash on startup. We have previously been there <https://ehsanakhgari.org/blog/2014-06-26/building-firefox-on-windows-with-clang-cl> but things have regressed since. #1 helps with keeping this working once we get there again. 3. See if we can run _some_ tests on the infra. Helps #1 and #2 not regress. 4. Get clang-cl builds with ASan on the infrasturcture. 5. See if we can run _some_ tests on these builds too. 6. Profit. So far all of this is being blocked on having people to work on it. I need #1 for other things so I’m hoping to get that done somehow in 2016. > If you are interested to talk more, or help fix clang issues, you should > contact the following persons: > > - Raymond Forbes [:rforbes] > - Nathan Froyd [:froydnj] > - Jeff Muizelaar [:jrmuizel] > - Ehsan Akhgari [:eshan] > > Also, we have few Clang contributors within Mozilla who might have a bit more > knowledge about the persons to ask to get momentum on the clang issues, such > as: > > - Jakob Stoklund Olesen [:jolesen] > - Dan Gohman [:sunfish] I have written some clang-cl fixes before and we have a pretty healthy relationship with the Google compiler team who are working on clang-cl so if we get to a point where we have specific issues to fix on the clang side, I’m sure we can get them fixed. Most of the problems however are probably on our side. > And for our build system issues on Windows, we should contact: > > - Mike Hommey [:glandium] I believe *most* of the build system integration has been finished. > 2.2/ Enable Crash reporter on ASan builds. > > The crash reporter is currently disabled on ASan builds, we need to figure > out why, one hypothesis (I do not recall the author) was that we have issues > with the SEGV handler. This part is platform dependent (there is no SEGV on Windows ;-) ). In theory, we should be able to use vectored exception handling <https://msdn.microsoft.com/en-us/library/windows/desktop/ms681420%28v=vs.85%29.aspx> to catch the exception no matter how breakpad handles it. > Another issue, is that the crash reporter does not capture the stderr stream. > Thus we might have to make additional patches to clang to give it the > ability to spew the reports in a file, that we can later attach to the bug > report. You should be able to get access to the error message by registering a callback through __asan_set_error_report_callback(). Messing directly with stderr stream shouldn’t be needed. > I don't know who is the right person, but I briefly discuss this issue with > Ted Mielczarek [:ted]. > > 2.4/ Soccoro interface to display multiple backtraces. > > Currently Soccoro only has support to display one backtrace. On the other > hand ASan builds might report 2 / 3 backtraces (allocation site, deallocation > site / crash site). We would have to extend Soccoro interface to be able to > search for the different backtraces, such that we can make buckets of crashes > which have identical allocation sites / deallocation sites. Another thing to think about is symbolifying the stack. Hopefully we can use the existing offline symbolification that breakpad does on the server side. > 2.5/ Release Management. > > ASan builds have a x2 overhead, and this implies that we have to ship > different binaries, ASan is not a simple toggle (as far as I know). > > The performance impact is too high to ship ASan builds by default (Lawrence > Mandel). And as this implies that we have to ship a new version of Firefox, > we would have to let people opt-in for a short while on nightly before making > them fallback to the normal nightly, or suggest this ASan builds on > supports.mozilla.org to investigate. > > The person to contact might be Sylvestre Ledru [:Sylvestre], based on > Lawrence suggestion. As Ted said, shipping with ASan on Windows has other issues as well. Hope this helps. Ehsan _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform