This is an archive of the discontinued LLVM Phabricator instance.

Make asan_symbolize.py not crash on Windows.
ClosedPublic

Authored by thakis on Jan 28 2015, 8:45 AM.

Details

Summary

asan_symbolize.py isn't needed on Windows, but it's nice if asan has a unified UI on all platforms. So rather than have asan_symolize.py die on startup due to it importing modules that don't exist on Windows, let it peacefully early-exit.

While here, also fix the indent on the argument parsing code.

Diff Detail

Event Timeline

thakis updated this revision to Diff 18895.Jan 28 2015, 8:45 AM
thakis retitled this revision from to Make asan_symbolize.py not crash on Windows..
thakis updated this object.
thakis edited the test plan for this revision. (Show Details)
thakis added reviewers: kcc, samsonov.
thakis added a subscriber: Unknown Object (MLST).
thakis updated this revision to Diff 18898.Jan 28 2015, 8:53 AM

act as cat on windows

Wouldn't it be better to do this in the Chromium-specific wrapper (src/tools/valgrind/asan_symbolize.py)?

earthdok removed a subscriber: earthdok.
glider accepted this revision.Jan 28 2015, 8:56 AM
glider edited edge metadata.

LGTM

lib/asan/scripts/asan_symbolize.py
450

I'd commit the formatting part separately.

480

Nit: spare comma?

This revision is now accepted and ready to land.Jan 28 2015, 8:56 AM

Note that we've moved away from using asan_symbolize.py in LLVM, so it's mainly used in Chrome.
Do we really want to filter ASan Win reports through asan_symbolize.py?

I thought it's needed if your binary is sandboxed. If we can stop using
asan_symbolize.py in Chromium, I'm happy to do that instead.

thakis updated this revision to Diff 18899.Jan 28 2015, 9:16 AM
thakis edited edge metadata.

put this in SymbolizationLoop instead, so that clients using this as a module benefit from it too

I'll land the indent changes separately, removed that from this change.

Wouldn't it be better to do this in the Chromium-specific wrapper (src/tools/valgrind/asan_symbolize.py)?

I moved it into SymbolizationLoop, so that the specific wrapper will do the right thing automatically.

lib/asan/scripts/asan_symbolize.py
453

err actually, I suppose I should copy stdin to stdout too

480

No, a traiilng comma in a print line makes print not add a \n. This is intentional because line already ends in a \n.

Yes, it's needed on Linux/OSX if your binary is sandboxed, but I don't understand why run it on Windows if you don't need it.

thakis closed this revision.Jan 28 2015, 9:29 AM

r227326, thanks!