digitalmars.D.ldc - ldc hangs up in release mode
What the best way to solve the problem and find out the reason of it?
Apr 27 2015
On Monday, 27 April 2015 at 12:13:26 UTC, drug wrote:What the best way to solve the problem and find out the reason of it?Hi drug! I can think of 2 ways: - use option -vv to find out if there is a loop in codegen - fire up a debugger and break until ldc run some times to see where it loops Could you provide an example? Regards, Kai
Apr 27 2015
On 27.04.2015 23:00, Kai Nacke wrote:On Monday, 27 April 2015 at 12:13:26 UTC, drug wrote:I use gdb ``` Attaching to process 13474 Reading symbols from /usr/local/bin/ldc2...done. Reading symbols from /usr/lib/x86_64-linux-gnu/libconfig.so.9...(no debugging symbols found)...done. Loaded symbols for /usr/lib/x86_64-linux-gnu/libconfig.so.9 Reading symbols from /lib/x86_64-linux-gnu/libpthread.so.0...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libpthread-2.19.so...done. done. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Loaded symbols for /lib/x86_64-linux-gnu/libpthread.so.0 Reading symbols from /lib/x86_64-linux-gnu/libdl.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libdl-2.19.so...done. done. Loaded symbols for /lib/x86_64-linux-gnu/libdl.so.2 Reading symbols from /lib/x86_64-linux-gnu/libtinfo.so.5...(no debugging symbols found)...done. Loaded symbols for /lib/x86_64-linux-gnu/libtinfo.so.5 Reading symbols from /lib/x86_64-linux-gnu/libz.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/x86_64-linux-gnu/libz.so.1 Reading symbols from /usr/lib/x86_64-linux-gnu/libffi.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/lib/x86_64-linux-gnu/libffi.so.6 Reading symbols from /usr/lib/x86_64-linux-gnu/libedit.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/x86_64-linux-gnu/libedit.so.2 Reading symbols from /usr/lib/x86_64-linux-gnu/libstdc++.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/lib/x86_64-linux-gnu/libstdc++.so.6 Reading symbols from /lib/x86_64-linux-gnu/libm.so.6...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libm-2.19.so...done. done. Loaded symbols for /lib/x86_64-linux-gnu/libm.so.6 Reading symbols from /lib/x86_64-linux-gnu/libgcc_s.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/x86_64-linux-gnu/libgcc_s.so.1 Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libc-2.19.so...done. done. Loaded symbols for /lib/x86_64-linux-gnu/libc.so.6 Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.19.so...done. done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from /lib/x86_64-linux-gnu/libbsd.so.0...(no debugging symbols found)...done. Loaded symbols for /lib/x86_64-linux-gnu/libbsd.so.0 0x000000000120bb05 in (anonymous namespace)::SCCPSolver::getStructValueState(llvm::Value*, unsigned int) () (gdb) c Continuing. ^C Program received signal SIGINT, Interrupt. 0x000000000120bb05 in (anonymous namespace)::SCCPSolver::getStructValueState(llvm::Value*, unsigned int) () (gdb) bt namespace)::SCCPSolver::getStructValueState(llvm::Value*, unsigned int) () namespace)::SCCPSolver, void>::visit(llvm::Instruction&) () namespace)::IPSCCP::runOnModule(llvm::Module&) () llvm::legacy::PassManagerImpl::run(llvm::Module&) () /home/drug/3rdparties/ldc/ldc/gen/optimizer.cpp:441 filename="service/.dub/build/normal-release-linux.posix-x86_64-ldmd2-91C4918C31AD443BF98F006B48FAF7C6/service.o") at /home/drug/3rdparties/ldc/ldc/driver/toobj.cpp:140 out>) at /home/drug/3rdparties/ldc/ldc/driver/main.cpp:1411 (gdb) c Continuing. ^C Program received signal SIGINT, Interrupt. 0x000000000120bb05 in (anonymous namespace)::SCCPSolver::getStructValueState(llvm::Value*, unsigned int) () (gdb) bt namespace)::SCCPSolver::getStructValueState(llvm::Value*, unsigned int) () namespace)::SCCPSolver, void>::visit(llvm::Instruction&) () namespace)::IPSCCP::runOnModule(llvm::Module&) () llvm::legacy::PassManagerImpl::run(llvm::Module&) () /home/drug/3rdparties/ldc/ldc/gen/optimizer.cpp:441 filename="service/.dub/build/normal-release-linux.posix-x86_64-ldmd2-91C4918C31AD443BF98F006B48FAF7C6/service.o") at /home/drug/3rdparties/ldc/ldc/driver/toobj.cpp:140 out>) at /home/drug/3rdparties/ldc/ldc/driver/main.cpp:1411 (gdb) ``` I several times breaks execution and every time ldc is in ::SCCPSolver::getStructValueState() function. Hope it's usefulWhat the best way to solve the problem and find out the reason of it?Hi drug! I can think of 2 ways: - use option -vv to find out if there is a loop in codegen - fire up a debugger and break until ldc run some times to see where it loops Could you provide an example? Regards, Kai
Apr 28 2015
Sorry for incovenience, it was a broken compiler installation.
May 05 2015
On Tuesday, 5 May 2015 at 08:33:13 UTC, drug wrote:Sorry for incovenience, it was a broken compiler installation.Glad to hear that you solved the problem! Regards, Kai
May 05 2015
On Tuesday, 5 May 2015 at 08:33:13 UTC, drug wrote:Sorry for incovenience, it was a broken compiler installation.Glad to hear that you solved the problem! Regards, Kai
May 05 2015