Closed Bug 1030826 (winasan) Opened 6 years ago Closed 2 months ago

Support AddressSanitizer builds on Windows with clang-cl

Categories

(Core :: General, defect)

All
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: ehsan, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

(Keywords: sec-want)

With the work done in bug 752004, we should be ready to try this out!
OS: Mac OS X → Windows 7
Hardware: x86 → All
Keywords: sec-want
Alias: winasan
Depends on: 1036215
Depends on: 1036235
Depends on: 1037058
Depends on: 998069
Depends on: 1080946
Depends on: 1081283
Depends on: 1082576
Depends on: 1082792
Depends on: 1082957
Depends on: 1082973
Depends on: 1082983
Depends on: 1082987
Depends on: 1082988
Depends on: 1083572
Depends on: 1083887
Depends on: 1084151
Depends on: 1084157
Assignee: nobody → ehsan.akhgari
Depends on: 1193452
Depends on: 1194834
Depends on: 1200740
Depends on: 1206193
Depends on: 1306642
Depends on: 1307179
Depends on: 1307547
Depends on: 1307561
Depends on: 1307933
Depends on: 1311211
Depends on: 1313394
Depends on: 1314169
Depends on: 1314183
Depends on: 1317471
dmajor, are you still working on this? I am picking up what else need to be fixed here, were you able to run mochitest with ASan?
(In reply to Ting-Yu Chou [:ting] from comment #1)
> dmajor, are you still working on this? I am picking up what else need to be
> fixed here, were you able to run mochitest with ASan?

I haven't looked at this in a while. A couple of months ago, ASan builds were good enough that I could launch the browser and watch youtube locally. I deliberately didn't investigate mochitests because historically Windows ASan builds were so finicky that no two developers got the same local results. I wanted to wait until we had tests running in Treeherder as the official source of truth for what is passing or failing. Once that happens, I'd be happy to help you get the tests green (or let you take it if you prefer).
(In reply to David Major [:dmajor] from comment #2)
> results. I wanted to wait until we had tests running in Treeherder as the
> official source of truth for what is passing or failing. Once that happens,
> I'd be happy to help you get the tests green (or let you take it if you
> prefer).

I see, I'll make it in Treeherder and definitely will need your help after that. For now, when I run:

  $ ASAN_SYMBOLIZER_PATH=/c/w/tools/clang/x64/bin/llvm-symbolizer.exe ./mach mochitest

I got this error everywhere:

  dir: accessible/tests/browser
  Increasing default timeout to 90 seconds on ASAN
  mozprofile.addons WARNING | Could not install c:\w\fx\mc\obj-asan\_tests\testing\mochitest\extensions\mozscreenshots: [Errno 2] No such file or directory: 'c:\\w\\fx\\mc\\obj-asan\\_tests\\testing\\mochitest\\extensions\\mozscreenshots\\install.rdf'
  =================================================================
  AddressSanitizer: nested bug in the same thread, aborting.

  1 ERROR TEST-UNEXPECTED-FAIL | runtests.py | Certificate integration failed
  Buffered messages finished

At least the tests need to be testable before setting them up in Treeherder, I'll investigate this.
Depends on: 1330835
My next plan is to setup a test platform similar to linux64-asan (win64-asan maybe) but is only available on Try.
Depends on: 1333003
Depends on: 1347793
Depends on: 1360120
See Also: → 1360650
See Also: → 1361185
Depends on: 1361185
See Also: 1361185
Depends on: 1360650
See Also: 1360650
Depends on: 1361256
Depends on: 1373562
Depends on: 1373763
Depends on: 1377517
Depends on: 1394543
Depends on: 1400754
Depends on: 1417504
Depends on: 1426176
Depends on: 1426271
Depends on: 1448378
Depends on: 1459617
Today I visited https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ and downloaded and ran firefox-63.0a1.en-US.win64-asan-reporter.installer.exe (24-Jul-2018 11:54).

FYI, during installation, I received the following error in a GUI pop-up:

> Title: maintenanceservice_tmp.exe - System Error
> 
> Body: [red circle with white X icon] The program can't start because clang_rt.asan_dynamic-x86-64.dll is missing from your computer.  Try reinstalling the program to fix this problem.
> 
> Buttons: OK

Neither Windows nor clang are my areas of expertise, so I'm not checking the "Add me to CC list" box on this bug.  If you would like me to do something, just use the `need-info` feature.

I learned about ASan via https://blog.mozilla.org/security/2018/07/19/introducing-the-asan-nightly-project/.  My systems has plenty of RAM so I'm happy to help.
(In reply to dave from comment #5)

I filed bug 1478096 to track this, as this bug here is just a generic tracking bug. Thanks for reporting this and supporting the project :)
Assignee: ehsan → nobody
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.