This is an archive of the discontinued LLVM Phabricator instance.

[asan] Add "arm64" into the list of 64-bit architectures
ClosedPublic

Authored by kubamracek on Feb 9 2018, 10:17 PM.

Details

Summary

It looks like get_bits_for_arch doesn't recognize "arm64" as a 64-bit architecture, and it actually matches the "arm" regexp, which marks it as 32-bit. Let's fix that by matching the 64-bit list first and addin "arm64" into the list.

Diff Detail

Event Timeline

kubamracek created this revision.Feb 9 2018, 10:17 PM
Herald added subscribers: Restricted Project, kristof.beyls, mgorny. · View Herald TranscriptFeb 9 2018, 10:17 PM

The patch is general looks good. Just a minor nit and a potential idea for a different implementation.

Does this patch change which ASan tests get run on arm64?

test/asan/CMakeLists.txt
21

I wonder if we should avoid using MATCHES and use STREQUAL instead. This would require listing each supported architecture (i.e. all variants would need to be specified) explicitly. This would avoid accidentally matching architectures in the future. This would bloat the code a bit though.

This might also be a bit painful for architecture variants that are supported out of tree because they'd now have to patch this macro whereas before it "just worked".

23

The arm regex should probably be ^armv7

Does this patch change which ASan tests get run on arm64?

Yes. Anything that was marked REQUIRES: asan-64-bits wasn't being run on arm64, and that's clearly a mistake.

test/asan/CMakeLists.txt
21

Generally, I agree, but I don't want to do it in this patch. Right now, let's just fix the obvious mistake of matching "arm64" and "mips64" as 32-bit architectures.

kubamracek added inline comments.Feb 12 2018, 1:39 PM
test/asan/CMakeLists.txt
23

There's also armv6 and probably other arm variants. Let's keep this as "arm" to avoid breaking others.

delcypher accepted this revision.Feb 14 2018, 7:50 AM
delcypher added inline comments.
test/asan/CMakeLists.txt
21

Sure.

23

I think the ^armv6 and ^armv7 regexes would capture all those variants but I won't insist on this.

This revision is now accepted and ready to land.Feb 14 2018, 7:50 AM
Closed by commit rCRT325300 (authored by kuba.brecka). · Explain WhyFeb 15 2018, 2:16 PM
This revision was automatically updated to reflect the committed changes.