Bug 27182 - gold: sporadic crashes when threads are enabled
Summary: gold: sporadic crashes when threads are enabled
Status: WAITING
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.35
: P2 normal
Target Milestone: ---
Assignee: Cary Coutant
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-14 11:23 UTC by Jean-Michaël Celerier
Modified: 2022-06-22 06:29 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed: 2021-01-14 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Michaël Celerier 2021-01-14 11:23:34 UTC
Hello,
here is the situation:

    $ pwd
    /home/jcelerier/perso/build-static/tests/static/foo=bar/CMakeFiles/CMakeTmp

    $ cat /home/jcelerier/perso/build-static/tests/static/foo=bar/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    #ifndef __cplusplus
    # error "The CMAKE_CXX_COMPILER is set to a C compiler"
    #endif
    int main(){return 0;}

    $ # compiling: ok
    $ /usr/bin/c++    -o CMakeFiles/cmTC_b634c.dir/testCXXCompiler.cxx.o -c /home/jcelerier/perso/build-static/tests/static/foo=bar/CMakeFiles/CMakeTmp/testCXXCompiler.cxx

    $ # linking:
    $ /usr/bin/c++  -fuse-ld=gold -Wl,--threads -Wl,--gdb-index  CMakeFiles/cmTC_b634c.dir/testCXXCompiler.cxx.o -o cmTC_b634c

gives me the following various errors: 

=====

tcache_thread_shutdown(): unaligned tcache chunk detected
double free or corruption (out)
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.

=====

/usr/bin/ld.gold : internal error in ~File_view, at position /build/binutils/src/binutils-gdb/gold/fileread.cc : 868

=====

double free or corruption (out)
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.

=====

collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.


etc... randomly. It compiles once every 10 times roughly.
I am on archlinux.

I am under the impression that this is due to the path containing uncommon characters ? (dots, '=')
Comment 1 H.J. Lu 2021-01-14 18:31:31 UTC
Please try master branch.  It may have been fixed.
Comment 2 H.J. Lu 2021-01-14 18:41:35 UTC
This may be a dup of PRs 26827/26200.