Bug#703790: segfaults when building curve25519-donna-c64.c on i386

Peter Palfrader weasel at debian.org
Thu Apr 4 09:47:42 UTC 2013


On Wed, 27 Mar 2013, Sylvestre Ledru wrote:

> On 23/03/2013 19:40, Peter Palfrader wrote:
> > Package: clang
> > Version: 1:3.0-6.1
> > Severity: normal
> > 
> > Trying to build curve25519-donna-c64.c[0] on i386 makes clang segfault.
> > It builds fine on amd64.
> Looks like it is fixed in the 3.2 release...
> 
> Upstream is not maintaining previous release and there are lot of
> changes between clang 3.0 & 3.2.
> I won't be able to bisect to find the fix. Sorry :/

Even 3.2 is broken for me:

| [experimental-i386-sbuild] weasel at dixie:~/tmp$ clang --version
| Debian clang version 3.2-1~exp9 (tags/RELEASE_32/final) (based on LLVM 3.2)
| Target: i386-pc-linux-gnu
| Thread model: posix
| [experimental-i386-sbuild] weasel at dixie:~/tmp$ cat conftst.c
| #include <stdint.h>
| typedef unsigned uint128_t __attribute__((mode(TI)));
| int main() {
|   uint64_t a = ((uint64_t)2000000000) * 1000000000;
|   uint64_t b = ((uint64_t)1234567890) << 24;
|   uint128_t c = ((uint128_t)a) * b;
|   return 0;
| }
| [experimental-i386-sbuild] weasel at dixie:~/tmp$ clang conftst.c
| 0  libLLVM-3.2.so.1 0xf6eef408
| 1  libLLVM-3.2.so.1 0xf6eef944
| 2  linux-gate.so.1  0xf76f2400 __kernel_sigreturn + 0
| 3  libLLVM-3.2.so.1 0xf6e1bca5 llvm::SelectionDAG::getNode(unsigned int, llvm::DebugLoc, llvm::EVT, llvm::SDValue) + 85
| 4  libLLVM-3.2.so.1 0xf6e3211d
| 5  libLLVM-3.2.so.1 0xf6e31857
| 6  libLLVM-3.2.so.1 0xf6e38332 llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) const + 5394
| 7  libLLVM-3.2.so.1 0xf6dc4c93
| 8  libLLVM-3.2.so.1 0xf6daa4ac
| 9  libLLVM-3.2.so.1 0xf6db2f12
| 10 libLLVM-3.2.so.1 0xf6dc3910
| 11 libLLVM-3.2.so.1 0xf6dc4965 llvm::SelectionDAG::LegalizeTypes() + 549
| 12 libLLVM-3.2.so.1 0xf6e741ed llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 205
| 13 libLLVM-3.2.so.1 0xf6e757c8 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 168
| 14 libLLVM-3.2.so.1 0xf6e760be llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 2270
| 15 libLLVM-3.2.so.1 0xf6e7786e llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 526
| 16 libLLVM-3.2.so.1 0xf670f37e llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 126
| 17 libLLVM-3.2.so.1 0xf68cc1bb llvm::FPPassManager::runOnFunction(llvm::Function&) + 619
| 18 libLLVM-3.2.so.1 0xf68cc21c llvm::FPPassManager::runOnModule(llvm::Module&) + 76
| 19 libLLVM-3.2.so.1 0xf68cbee4 llvm::MPPassManager::runOnModule(llvm::Module&) + 500
| 20 libLLVM-3.2.so.1 0xf68ce748 llvm::PassManagerImpl::run(llvm::Module&) + 120
| 21 libLLVM-3.2.so.1 0xf68ce796 llvm::PassManager::run(llvm::Module&) + 38
| 22 clang            0x082fb5af clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 3471
| 23 clang            0x082f94aa
| 24 clang            0x08458125 clang::ParseAST(clang::Sema&, bool, bool) + 645
| 25 clang            0x081aa278 clang::ASTFrontendAction::ExecuteAction() + 120
| 26 clang            0x082f8551 clang::CodeGenAction::ExecuteAction() + 33
| 27 clang            0x081aa788 clang::FrontendAction::Execute() + 104
| 28 clang            0x0818fadd clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 253
| 29 clang            0x08178842 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1362
| 30 clang            0x08170e94 cc1_main(char const**, char const**, char const*, void*) + 1156
| 31 clang            0x0817777d main + 7101
| 32 libc.so.6        0xf5e645b5 __libc_start_main + 245
| 33 clang            0x08170871
| Stack dump:
| 0.      Program arguments: /usr/bin/clang -cc1 -triple i386-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name conftst.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu pentium4 -target-linker-version 2.22 -momit-leaf-frame-pointer -resource-dir /usr/bin/../lib/clang/3.2 -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.2/include -internal-isystem /usr/include/clang/3.2/include/ -internal-externc-isystem /usr/include/i386-linux-gnu -internal-externc-isystem /usr/include/i486-linux-gnu -internal-externc-isystem /usr/include -fdebug-compilation-dir /home/weasel/tmp -ferror-limit 19 -fmessage-length 109 -mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/conftst-UpWQDy.o -x c conftst.c
| 1.      <eof> parser at end of file
| 2.      Code generation
| 3.      Running pass 'Function Pass Manager' on module 'conftst.c'.
| 4.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@main'
| clang: error: unable to execute command: Segmentation fault
| clang: error: clang frontend command failed due to signal (use -v to see invocation)
| Debian clang version 3.2-1~exp9 (tags/RELEASE_32/final) (based on LLVM 3.2)
| Target: i386-pc-linux-gnu
| Thread model: posix
| clang: 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: note: diagnostic msg:
| ********************
| 
| PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
| Preprocessed source(s) and associated run script(s) are located at:
| clang: note: diagnostic msg: /tmp/conftst-G6tPtY.c
| clang: note: diagnostic msg: /tmp/conftst-G6tPtY.sh
| clang: note: diagnostic msg:
| 
| ********************
| [experimental-i386-sbuild] weasel at dixie:~/tmp$ 

Cheers,
weasel
-- 
                           |  .''`.       ** Debian **
      Peter Palfrader      | : :' :      The  universal
 http://www.palfrader.org/ | `. `'      Operating System
                           |   `-    http://www.debian.org/



More information about the Pkg-llvm-team mailing list