Skip to content

Segfault bootstrapping on aarch64 #1931

@markos

Description

@markos

After bootstrapping successfully from the latest ltsmaster on debian/arm64 (unstable), I tried to build the latest 1.1.0+b6 package. Tried with both llvm-3.8 (default for the package) and llvm-3.9 (in case it contained fixes for arm64), bootstrap fails eventually at this point:

# cd /root/ldc-1.1.0+b6 && /root/ldc-1.1.0+b6/build-static/bin/ldc2 --output-o -c -I/root/ldc-1.1.0+b6/runtime/druntime/src -I/root/ldc-1.1.0+b6/runtime/druntime/src/gc /root/ldc-1.1.0+b6/runtime/phobos/std/array.d -of/root/ldc-1.1.0+b6/build-static/runtime/std/array-debug.o -g -link-debuglib -I/root/ldc-1.1.0+b6/runtime/phobos -v-cg
0  libLLVM-3.9.so.1 0x0000ffff7f580f44 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 52
Segmentation fault
root@sirius:~/ldc-1.1.0+b6# gdb /root/ldc-1.1.0+b6/build-static/bin/ldc2
GNU gdb (Debian 7.12-4) 7.12
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /root/ldc-1.1.0+b6/build-static/bin/ldc2...done.
(gdb) run --output-o -c -I/root/ldc-1.1.0+b6/runtime/druntime/src -I/root/ldc-1.1.0+b6/runtime/druntime/src/gc /root/ldc-1.1.0+b6/runtime/phobos/std/array.d -of/root/ldc-1.1.0+b6/build-static/runtime/std/array-debug.o -g -link-debuglib -I/root/ldc-1.1.0+b6/runtime/phobos
Starting program: /root/ldc-1.1.0+b6/build-static/bin/ldc2 --output-o -c -I/root/ldc-1.1.0+b6/runtime/druntime/src -I/root/ldc-1.1.0+b6/runtime/druntime/src/gc /root/ldc-1.1.0+b6/runtime/phobos/std/array.d -of/root/ldc-1.1.0+b6/build-static/runtime/std/array-debug.o -g -link-debuglib -I/root/ldc-1.1.0+b6/runtime/phobos
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
_IO_vsnprintf (string=0xaaaaab009360 "", maxlen=<optimized out>, format=0xaaaaaae92157 "__unittestL%u_", args=<error reading variable: Cannot access memory at address 0x111>) at vsnprintf.c:114
114	vsnprintf.c: No such file or directory.
(gdb) where
#0  _IO_vsnprintf (string=0xaaaaab009360 "", maxlen=<optimized out>, format=0xaaaaaae92157 "__unittestL%u_", args=<error reading variable: Cannot access memory at address 0x111>) at vsnprintf.c:114
#1  0x0000aaaaaacbf248 in OutBuffer::vprintf(char const*, std::__va_list) ()
#2  0x0000aaaaaac389bc in OutBuffer::printf(char const*, ...) ()
#3  0x0000aaaaaad0bd40 in unitTestId(Loc) ()
#4  0x0000aaaaaac263c0 in ddmd.parse.Parser.parseDeclDefs(int, ddmd.dsymbol.Dsymbol*, ddmd.parse.PrefixAttributes*) ()
#5  0x0000aaaaaac2538c in ddmd.parse.Parser.parseDeclDefs(int, ddmd.dsymbol.Dsymbol*, ddmd.parse.PrefixAttributes*) ()
#6  0x0000aaaaaac2538c in ddmd.parse.Parser.parseDeclDefs(int, ddmd.dsymbol.Dsymbol*, ddmd.parse.PrefixAttributes*) ()
#7  0x0000aaaaaac2538c in ddmd.parse.Parser.parseDeclDefs(int, ddmd.dsymbol.Dsymbol*, ddmd.parse.PrefixAttributes*) ()
#8  0x0000aaaaaac93008 in ddmd.parse.Parser.parseModule() ()
#9  0x0000aaaaaac916cc in Module::parse() ()
#10 0x0000aaaaaad302e8 in mars_mainBody(Array<char const*>&, Array<char const*>&) ()
#11 0x0000aaaaaae2d49c in cppmain (argc=<optimized out>, argv=<optimized out>) at ./driver/main.cpp:1101
#12 0x0000aaaaaae77dac in rt.dmain2._d_run_main(int, char**, extern(C) int(char[][]) function).runAll().__lambda1() ()
#13 0x0000aaaaaae77d64 in rt.dmain2._d_run_main(int, char**, extern(C) int(char[][]) function).tryExec(scope void() delegate) ()
#14 0x0000aaaaaae77c68 in _d_run_main ()
#15 0x0000ffffb5506364 in __libc_start_main (main=0x0, argc=0, argv=0x0, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at libc-start.c:291
#16 0x0000aaaaaabf4238 in _start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions