Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

clang fails to start with "realloc(): invalid old size" on ppc64el #46997

Open Quuxplusone opened 3 years ago

Quuxplusone commented 3 years ago
Bugzilla Link PR48028
Status NEW
Importance P release blocker
Reported by Sylvestre Ledru (sylvestre@debian.org)
Reported on 2020-10-30 16:38:32 -0700
Last modified on 2020-11-02 22:48:06 -0800
Version trunk
Hardware PC Linux
CC fwage73@gmail.com, llvm-bugs@lists.llvm.org, nemanja.i.ibm@gmail.com, wschmidt@linux.vnet.ibm.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Reported here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972333

It seems it was caused by a new version of binutils (2.35.1-2 probably):
https://tracker.debian.org/news/1181645/accepted-binutils-2351-2-source-into-unstable/

Maybe these patches?
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=4d8ee860737005517be588f4771c358593fa421c
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=e6f04d55f681149a69102a73937d0987719c3f16;hp=55b8e31a7a109bbd4efd7a59408c3c59dcf62ee0

 %  /home/sylvestre/llvm-toolchain-11-11.0.0/build-llvm/tools/clang/stage2-bins/bin/clang++
realloc(): invalid old size
Quuxplusone commented 3 years ago
The backtrace:

#0  0x00007fffef4575b8 in raise () from /lib/powerpc64le-linux-gnu/libc.so.6
#1  0x00007fffef437ce8 in abort () from /lib/powerpc64le-linux-gnu/libc.so.6
#2  0x00007fffef4a4cd4 in ?? () from /lib/powerpc64le-linux-gnu/libc.so.6
#3  0x00007fffef4aff28 in ?? () from /lib/powerpc64le-linux-gnu/libc.so.6
#4  0x00007fffef4b50f8 in ?? () from /lib/powerpc64le-linux-gnu/libc.so.6
#5  0x00007fffef4b6720 in realloc () from /lib/powerpc64le-linux-gnu/libc.so.6
#6  0x00007ffff052d6f4 in safe_realloc ()
    at /home/sylvestre/llvm-toolchain-11-11.0.0/llvm/include/llvm/Support/MemAlloc.h:53
#7  grow ()
    at /home/sylvestre/llvm-toolchain-11-11.0.0/llvm/include/llvm/ADT/BitVector.h:893
#8  0x00007ffff052cb84 in resize ()
    at /home/sylvestre/llvm-toolchain-11-11.0.0/llvm/include/llvm/ADT/BitVector.h:375
#9  0x00007ffff0473790 in _GLOBAL__sub_I_ARMSubtarget.cpp ()
    at /home/sylvestre/llvm-toolchain-11-11.0.0/llvm/include/llvm/Support/CommandLine.h:1301
#10 0x0000000000000000 in ?? ()
Quuxplusone commented 3 years ago
Please note that it is happening only on this arch on Debian.

And happening from version 8:
https://buildd.debian.org/status/package.php?p=llvm-toolchain-8
to 11:
https://buildd.debian.org/status/package.php?p=llvm-toolchain-11
Quuxplusone commented 3 years ago

Moving from gold to bfd as linker fixed the issue (ie NOT using -fuse-ld=gold)