diff options
| author | Rainer Orth <ro@gcc.gnu.org> | 2020-09-17 11:17:11 +0200 |
|---|---|---|
| committer | Rainer Orth <ro@gcc.gnu.org> | 2020-09-17 11:17:11 +0200 |
| commit | a9cbe5cf30e386a4f44981f5bf9e1862ad36574d (patch) | |
| tree | d9a5e2c8895f7197bfd4ea77843025376631e8b2 /llvm/lib/CodeGen/ModuloSchedule.cpp | |
| parent | b03c2b8395ba94fb53f1e73a6473faedf628bbd9 (diff) | |
| download | llvm-a9cbe5cf30e386a4f44981f5bf9e1862ad36574d.zip llvm-a9cbe5cf30e386a4f44981f5bf9e1862ad36574d.tar.gz llvm-a9cbe5cf30e386a4f44981f5bf9e1862ad36574d.tar.bz2 | |
[X86] Fix stack alignment on 32-bit Solaris/x86
On Solaris/x86, several hundred 32-bit tests `FAIL`, all in the same way:
env ASAN_OPTIONS=halt_on_error=false ./halt_on_error_suppress_equal_pcs.cpp.tmp
Segmentation Fault (core dumped)
They segfault during startup:
Thread 2 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
0x080f21f0 in __sanitizer::internal_mmap(void*, unsigned long, int, int, int, unsigned long long) () at /vol/llvm/src/llvm-project/dist/compiler-rt/lib/sanitizer_common/sanitizer_solaris.cpp:65
65 int prot, int flags, int fd, OFF_T offset) {
1: x/i $pc
=> 0x80f21f0 <_ZN11__sanitizer13internal_mmapEPvmiiiy+16>: movaps 0x30(%esp),%xmm0
(gdb) p/x $esp
$3 = 0xfeffd488
The problem is that `movaps` expects 16-byte alignment, while 32-bit Solaris/x86
only guarantees 4-byte alignment following the i386 psABI.
This patch updates `X86Subtarget::initSubtargetFeatures` accordingly,
handles Solaris/x86 in the corresponding testcase, and allows for some
variation in address alignment in
`compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp`.
Tested on `amd64-pc-solaris2.11` and `x86_64-pc-linux-gnu`.
Differential Revision: https://reviews.llvm.org/D87615
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
0 files changed, 0 insertions, 0 deletions
