Open Quuxplusone opened 4 years ago
CPP file is too big to attach. Finding a way to work around.
the produced cpp file is 274001 lines / 11M. I'll try and reduce this down a little and update next week.
Ok, I've reduced this down to a single line!
$ cat volatile.cpp
void func() { __asm__ __volatile__ ("\n" :: "nop" ("")); }
$ /home/alahay01/llvm/clang-2020-01-17_14-50-39-b21031/bin/clang-11 -c
volatile.cpp
clang-11: /home/buildslave/buildslave/clang-aarch64-linux-build-
cache/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:8383: void
llvm::SelectionDAGBuilder::visitInlineAsm(llvm::ImmutableCallSite): Assertion
`ConstraintID != InlineAsm::Constraint_Unknown && "Failed to convert memory
constraint code to constraint id."' failed.
Stack dump:
0. Program arguments: /home/alahay01/llvm/clang-2020-01-17_14-50-39-
b21031/bin/clang-11 -c volatile.cpp
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'volatile.cpp'.
4. Running pass 'AArch64 Instruction Selection' on function '@_Z4funcv'
#0 0x00000000019e9cec PrintStackTraceSignalHandler(void*)
(/home/alahay01/llvm/clang-2020-01-17_14-50-39-b21031/bin/clang-11+0x19e9cec)
clang-11: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 11.0.0 (/home/buildslave/buildslave/clang-aarch64-linux-build-
cache/llvm/clang 8eb4d25a0943bce6e8a4859825dce4f67a4f6384)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/alahay01/llvm/clang-2020-01-17_14-50-39-b21031/bin
clang-11: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-11: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-11: note: diagnostic msg: /tmp/volatile-f5dca4.cpp
clang-11: note: diagnostic msg: /tmp/volatile-f5dca4.sh
clang-11: note: diagnostic msg:
********************
LLVM ERROR: out of memory
Aborted
Attached flag.diff
(1092 bytes, text/plain): cflag changes for openJDK
Attached compileBroker-123210.sh
(9219 bytes, text/x-sh): sh file created by llvm
Attached compileBroker-123210.sh
(9219 bytes, text/x-sh): file created by llvm
Attached volatile-f5dca4.cpp
(95 bytes, text/plain): C file created by crash report
Attached volatile-f5dca4.sh
(2568 bytes, text/x-sh): sh file created by crash report
Note that the attached failure isn't useful (or possibly correct) C code.
The code is a heavy reduction of the code created when using the STAP_PROBE
macros found in /usr/include/aarch64-linux-gnu/sys/sdt.h. These macros create a
large block of asm volatile code. When used they create exactly the same error
as my 1 line attached file.
An alternative, more real-world way of producing the same error is by simply
using:
#include <sys/sdt.h>
void func() { STAP_PROBE1("a","b","c"); };
flag.diff
(1092 bytes, text/plain)compileBroker-123210.sh
(9219 bytes, text/x-sh)compileBroker-123210.sh
(9219 bytes, text/x-sh)volatile-f5dca4.cpp
(95 bytes, text/plain)volatile-f5dca4.sh
(2568 bytes, text/x-sh)