Add an AArch64 ARMv8.1-A LSE and ARMv8.3-A RCpc atomics fixture - #217
Add an AArch64 ARMv8.1-A LSE and ARMv8.3-A RCpc atomics fixture#217zardus wants to merge 2 commits into
Conversation
tests/aarch64/lse_atomics is a static ARMv8.4-A ELF whose .text carries the
eight LD<OP> forms, SWP, CAS, CASP, LDAPR{,B,H} and LDAPUR/STLUR at both
widths, one encoding per named function. No tracked AArch64 object had any of
them, so a lifter change for these encodings had nothing to assert on.
tests_src/aarch64_lse_atomics/build.sh reproduces the committed bytes from the
C beside it, pinning the cross toolchain to the nixpkgs revision the angr
development workspace uses.
|
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS Validation record for head What the shape scan says. Reading the first 20 bytes of all 1,791 tracked files and keeping ELF objects with Readback of the committed artifact.
Reproducibility. Leak scan. Encoding coverage of Not run. This repository has no executable test suite and no pre-commit configuration, so neither ran. The consumer's suite is in the pyvex pull request. session: sharpen |
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS
Problem
Nothing in this repository carries an ARMv8.1-A LSE atomic or an ARMv8.3-A
LDAPR, so a lifter change for those encodings has no compiled input to assert on. Scanning every tracked AArch64 ELF -- 17 objects, 274,169 instructions decoded with capstone over eachSHF_EXECINSTRsection -- finds zero of them,tests/aarch64/libc.so.6included:Root cause
These encodings only appear when a compiler is told the target has them. GCC emits them from ordinary C11 and
__atomic_*builtins under-march=armv8.1-a -mno-outline-atomics, and every AArch64 object here predates that or was built for baseline ARMv8.0.Fix
tests/aarch64/lse_atomicsis an 8272-byte static ARMv8.4-A ELF built from the C intests_src/aarch64_lse_atomics/. Its 861.textinstructions include 97 LSE, RCpc and RCpc2 encodings across 57 distinct mnemonics -- the eightLD<OP>forms,SWP,CAS,CASP,LDAPR{,B,H}andLDAPUR/STLUR-- at both W and X widths, one per named function so a test can reach an encoding by symbol.build.shpins the toolchain through the workspace's own nixpkgs revision and setsSOURCE_DATE_EPOCH,-ffile-prefix-mapand-Wl,--build-id=none; three builds from three different directories produced sha2567f581abb…byte for byte.strings -a -n 1over the artifact yields 1058 runs, none containing a path, a user name, a host name, a toolchain version or a date.Where GCC has no C spelling -- it has no atomic min/max builtin, and it lowers a 128-bit compare-exchange to a
libatomiccall rather than toCASP-- the encoding comes from inline asm inside an ordinary C function, compiled and assembled by the same cross toolchain. The comments insrc/lse_asm.candsrc/rcpc2.csay which and why.Testing
readelfreads the committed file back as ET_EXEC AArch64,e_flags 0x0, entry0x400e60, six section headers and 99STT_FUNCsymbols;cle.Loaderloads it and sees all 99. Re-runningbuild.shreproduces the committed bytes exactly. The consumer is the pyvex regression in angr/pyvex#579, which lifts every word of.textand asserts that only the ARMv8.4-A RCpc2 group is still refused.Validation: #217 (comment)
session: sharpen