-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Description
| Bugzilla Link | 34605 |
| Resolution | FIXED |
| Resolved on | Oct 12, 2017 19:00 |
| Version | trunk |
| OS | Linux |
| Blocks | #33840 |
| CC | @topperc,@zmodem,@RKSimon,@tstellar |
| Fixed by commit(s) | r313366 r315198 |
Extended Description
This test fails differently(runfail with Illigal instruction, Segm.fault on compilation) on skx, O2, m32
================= supernice.c ==============
char a[512];
int main (void)
{
#ifdef RUNFAIL
int i;
for (i = 0; i < 512; i++)
fill(a, i, 512 - 1);
#endif
return 0;
}
void fill (char * const s, int p, int len)
{
int i;
for (i = 0; i < 512; i++)
#ifndef RUNFAIL
if (i){
#else
if (i == len){
#endif
s[i] = 0;
} else {
#ifdef ILLEGAL
s[i] = (i == p);
#else
s[i] = 0;
#endif
}
}
clang -v
clang version 6.0.0 (trunk 313257)
Target: x86_64-unknown-linux-gnu
Thread model: posix
...
clang -m32 -march=skx -O2 -o supernice.exe supernice.c
sde -skx -- ./supernice.exe
clang -m32 -march=skx -O2 -o supernice.exe supernice.c -DRUNFAIL -DILLEGAL
sde -skx -- ./supernice.exe
Illegal instruction (core dumped)
clang -m32 -march=skx -O2 -o supernice.exe supernice.c -DILLEGAL
#0 0x0000000001d79b5a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (.../build/bin/clang-6.0+0x1d79b5a)
#1 0x0000000001d77e2e llvm::sys::RunSignalHandlers() (.../build/bin/clang-6.0+0x1d77e2e)
#2 0x0000000001d77f6a SignalHandler(int) (.../build/bin/clang-6.0+0x1d77f6a)
#3 0x00007fb3eb4535e0 __restore_rt (/lib64/libpthread.so.0+0xf5e0)
#4 0x00000000012cf137 llvm::X86GenRegisterInfo::getSubClassWithSubReg(llvm::TargetRegisterClass const*, unsigned int) const (.../build/bin/clang-6.0+0x12cf137)
#5 0x000000000250fa54 llvm::InstrEmitter::EmitSubregNode(llvm::SDNode*, llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfollvm::SDValue, llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&, bool, bool) (.../build/bin/clang-6.0+0x250fa54)
#6 0x0000000002512582 llvm::InstrEmitter::EmitMachineNode(llvm::SDNode*, bool, bool, llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfollvm::SDValue, llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&) (.../build/bin/clang-6.0+0x2512582)
#7 0x000000000250a849 llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&) (.../build/bin/clang-6.0+0x250a849)
#8 0x000000000249eccf llvm::SelectionDAGISel::CodeGenAndEmitDAG() (.../build/bin/clang-6.0+0x249eccf)
#9 0x00000000024a651a llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (.../build/bin/clang-6.0+0x24a651a)
#10 0x00000000024a8a33 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) [clone .part.960] (.../build/bin/clang-6.0+0x24a8a33)
#11 0x000000000131d364 (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.../build/bin/clang-6.0+0x131d364)
#12 0x00000000016e9b27 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.../build/bin/clang-6.0+0x16e9b27)
#13 0x000000000196128a llvm::FPPassManager::runOnFunction(llvm::Function&) (.../build/bin/clang-6.0+0x196128a)
#14 0x0000000001961323 llvm::FPPassManager::runOnModule(llvm::Module&) (.../build/bin/clang-6.0+0x1961323)
#15 0x0000000001961c70 llvm::legacy::PassManagerImpl::run(llvm::Module&) (.../build/bin/clang-6.0+0x1961c70)
#16 0x0000000001ef2c88 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) (.../build/bin/clang-6.0+0x1ef2c88)
#17 0x0000000001ef4676 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) (.../build/bin/clang-6.0+0x1ef4676)
#18 0x000000000254ce26 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (.../build/bin/clang-6.0+0x254ce26)
#19 0x00000000028d84b2 clang::ParseAST(clang::Sema&, bool, bool) (.../build/bin/clang-6.0+0x28d84b2)
#20 0x000000000254c6b4 clang::CodeGenAction::ExecuteAction() (.../build/bin/clang-6.0+0x254c6b4)
#21 0x0000000002254a5e clang::FrontendAction::Execute() (.../build/bin/clang-6.0+0x2254a5e)
#22 0x000000000222e6fd clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (.../build/bin/clang-6.0+0x222e6fd)
#23 0x00000000022df9e4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (.../build/bin/clang-6.0+0x22df9e4)
#24 0x0000000000ac4048 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (.../build/bin/clang-6.0+0xac4048)
#25 0x0000000000a42536 main (.../build/bin/clang-6.0+0xa42536)
#26 0x00007fb3ea031c05 __libc_start_main (/lib64/libc.so.6+0x21c05)
#27 0x0000000000abfa59 _start (.../build/bin/clang-6.0+0xabfa59)
Stack dump:
- Program arguments: .../build/bin/clang-6.0 -cc1 -triple i386-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name supernice.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu skx -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -resource-dir .../build/lib/clang/6.0.0 -D ILLEGAL -c-isystem .../last_release/projects/openmp/runtime/src -c-isystem .../libedit/include -c-isystem . -cxx-isystem .../last_release/projects/openmp/runtime/src -cxx-isystem .../libedit/include -cxx-isystem . -internal-isystem /usr/local/include -internal-isystem .../build/lib/clang/6.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -fdebug-compilation-dir /test -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o /tmp/supernice-8384a6.o -x c supernice.c
- parser at end of file
- Code generation
- Running pass 'Function Pass Manager' on module 'supernice.c'.
- Running pass 'X86 DAG->DAG Instruction Selection' on function '@fill'
clang-6.0: error: unable to execute command: Segmentation fault (core dumped)
clang-6.0: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 6.0.0 (trunk 313257)
Target: i386-unknown-linux-gnu
Thread model: posix
InstalledDir: .../last_release/bin
clang-6.0: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-6.0: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/supernice-c645bc.c
clang-6.0: note: diagnostic msg: /tmp/supernice-c645bc.sh
clang-6.0: note: diagnostic msg: