Package: ldc
Version: 1:1.20.1-1
Severity: normal

This is probably related to the fact that pow by default uses real for
the argument, and it tries to generate x87 code for this.

$ cat f.d
import std.math : pow;

void main() {
    double x = pow(1.01, 1.3);
}
$


$ gdb --args ldc2 -mcpu=znver2 -mattr=-x87 ./f.d
Reading symbols from ldc2...
Reading symbols from 
/usr/lib/debug/.build-id/ad/062faf6b99f47b20e4afca986359f365881f56.debug...
(gdb) r
Starting program: /usr/bin/ldc2 -mcpu=znver2 -mattr=-x87 ./f.d
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
allocVirtReg () at 
/build/llvm-toolchain-9-RFyMo0/llvm-toolchain-9-9.0.1/llvm/lib/CodeGen/RegAllocFast.cpp:675
675     
/build/llvm-toolchain-9-RFyMo0/llvm-toolchain-9-9.0.1/llvm/lib/CodeGen/RegAllocFast.cpp:
 No such file or directory.
(gdb) bt
#0  allocVirtReg () at 
/build/llvm-toolchain-9-RFyMo0/llvm-toolchain-9-9.0.1/llvm/lib/CodeGen/RegAllocFast.cpp:675
#1  0x00007ffff4ad4a4a in defineVirtReg () at 
/build/llvm-toolchain-9-RFyMo0/llvm-toolchain-9-9.0.1/llvm/lib/CodeGen/RegAllocFast.cpp:795
#2  0x00007ffff4ad26e1 in allocateInstruction () at 
/build/llvm-toolchain-9-RFyMo0/llvm-toolchain-9-9.0.1/llvm/lib/CodeGen/RegAllocFast.cpp:1188
#3  allocateBasicBlock () at 
/build/llvm-toolchain-9-RFyMo0/llvm-toolchain-9-9.0.1/llvm/lib/CodeGen/RegAllocFast.cpp:1277
#4  runOnMachineFunction () at 
/build/llvm-toolchain-9-RFyMo0/llvm-toolchain-9-9.0.1/llvm/lib/CodeGen/RegAllocFast.cpp:1316
#5  0x00007ffff4a090b8 in runOnFunction () at 
/build/llvm-toolchain-9-RFyMo0/llvm-toolchain-9-9.0.1/llvm/lib/CodeGen/MachineFunctionPass.cpp:73
#6  0x00007ffff4881c86 in runOnFunction () at 
/build/llvm-toolchain-9-RFyMo0/llvm-toolchain-9-9.0.1/llvm/lib/IR/LegacyPassManager.cpp:1648
#7  0x00007ffff4881f33 in runOnModule () at 
/build/llvm-toolchain-9-RFyMo0/llvm-toolchain-9-9.0.1/llvm/lib/IR/LegacyPassManager.cpp:1685
#8  0x00007ffff48823e0 in runOnModule () at 
/build/llvm-toolchain-9-RFyMo0/llvm-toolchain-9-9.0.1/llvm/lib/IR/LegacyPassManager.cpp:1750
#9  run () at 
/build/llvm-toolchain-9-RFyMo0/llvm-toolchain-9-9.0.1/llvm/lib/IR/LegacyPassManager.cpp:1863
#10 0x0000555555cd1219 in (anonymous namespace)::codegenModule (Target=..., 
m=..., filename=filename@entry=0x55555617f0b0 "f.o", 
fileType=fileType@entry=llvm::TargetMachine::CGFT_ObjectFile)
    at ./driver/toobj.cpp:131
#11 0x0000555555cd1fa6 in (anonymous namespace)::writeObjectFile 
(filename=0x55555617f0b0 "f.o", m=0x5555563e54e0) at ./driver/toobj.cpp:284
#12 writeModule (m=m@entry=0x5555563e54e0, 
filename=filename@entry=0x55555617f0b0 "f.o") at ./driver/toobj.cpp:469
#13 0x0000555555ccea04 in ldc::CodeGenerator::writeAndFreeLLModule 
(this=this@entry=0x7fffffffd9f0, filename=0x55555617f0b0 "f.o") at 
./driver/codegenerator.cpp:285
#14 0x0000555555ccecef in ldc::CodeGenerator::finishLLModule 
(this=this@entry=0x7fffffffd9f0, m=m@entry=0x7ffff1f55930) at 
./driver/codegenerator.cpp:258
#15 0x0000555555ccede3 in ldc::CodeGenerator::finishLLModule (m=0x7ffff1f55930, 
this=0x7fffffffd9f0) at ./driver/codegenerator.cpp:336
#16 ldc::CodeGenerator::emit (this=this@entry=0x7fffffffd9f0, m=0x7ffff1f55930) 
at ./driver/codegenerator.cpp:336
#17 0x0000555555c9e9ef in codegenModules (modules=...) at ./driver/main.cpp:1107
#18 0x0000555555a75dfb in mars_mainBody(Param&, Array<char const*>&, Array<char 
const*>&) () at /usr/lib/llvm-9/include/llvm/LinkAllIR.h:46
#19 0x0000555555ca0e62 in cppmain () at ./driver/main.cpp:1078
#20 0x0000555555e03430 in _D2rt6dmain212_d_run_main2UAAamPUQgZiZ6runAllMFZv ()
#21 0x0000555555e0323f in _d_run_main2 ()
#22 0x0000555555e0309e in _d_run_main ()
#23 0x000055555598180e in main (argc=argc@entry=4, 
originalArgv=originalArgv@entry=0x7fffffffe0a8) at 
/usr/lib/llvm-9/include/llvm/ADT/SmallVector.h:144
#24 0x00007ffff36ece0b in __libc_start_main (main=0x5555559815c0 <main(int, 
char const**)>, argc=4, argv=0x7fffffffe0a8, init=<optimized out>, 
fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x7fffffffe098) at ../csu/libc-start.c:308
#25 0x0000555555983afa in _start () at 
/usr/lib/llvm-9/include/llvm/LinkAllIR.h:46
(gdb) 




-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.2.0-3-amd64 (SMP w/32 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ldc depends on:
ii  libc6                      2.30-7
ii  libgcc-s1                  10.1.0-1
ii  libllvm9                   1:9.0.1-12
ii  libphobos2-ldc-shared-dev  1:1.20.1-1
ii  libstdc++6                 10.1.0-1
ii  zlib1g                     1:1.2.11.dfsg-2

ldc recommends no packages.

ldc suggests no packages.

-- no debconf information

Reply via email to