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.
Details
Diff Detail
- Repository
- rCRT Compiler Runtime
Event Timeline
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. |
test/asan/CMakeLists.txt | ||
---|---|---|
23 | There's also armv6 and probably other arm variants. Let's keep this as "arm" to avoid breaking others. |
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".