Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault when using the mold linker #220

Closed
MasterDuke17 opened this issue May 2, 2024 · 2 comments
Closed

Segfault when using the mold linker #220

MasterDuke17 opened this issue May 2, 2024 · 2 comments

Comments

@MasterDuke17
Copy link

The archlinux package (https://aur.archlinux.org/packages/dwarfs) segfaults during the build with the mold linker. It does build just fine when not using mold.

[ 95%] Linking CXX executable chmod_transformer_test
CMake Error at /usr/share/cmake/Modules/GoogleTestAddTests.cmake:112 (message):
  Error running test executable.

    Path: '/home/dan/.cache/yay/dwarfs/src/build/chmod_transformer_test'
    Working directory: '/home/dan/.cache/yay/dwarfs/src/build'
    Result: Segmentation fault
    Output:
      

Call Stack (most recent call first):
  /usr/share/cmake/Modules/GoogleTestAddTests.cmake:226 (gtest_discover_tests_impl)


make[2]: *** [CMakeFiles/chmod_transformer_test.dir/build.make:159: chmod_transformer_test] Error 1
make[2]: *** Deleting file 'chmod_transformer_test'
make[1]: *** [CMakeFiles/Makefile2:1203: CMakeFiles/chmod_transformer_test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 95%] Linking CXX executable file_access_test
[ 95%] Linking CXX executable error_test
CMake Error at /usr/share/cmake/Modules/GoogleTestAddTests.cmake:112 (message):
  Error running test executable.

    Path: '/home/dan/.cache/yay/dwarfs/src/build/file_access_test'
    Working directory: '/home/dan/.cache/yay/dwarfs/src/build'
    Result: Segmentation fault
    Output:
      

Call Stack (most recent call first):
  /usr/share/cmake/Modules/GoogleTestAddTests.cmake:226 (gtest_discover_tests_impl)


make[2]: *** [CMakeFiles/file_access_test.dir/build.make:159: file_access_test] Error 1
make[2]: *** Deleting file 'file_access_test'
make[1]: *** [CMakeFiles/Makefile2:1428: CMakeFiles/file_access_test.dir/all] Error 2
[ 95%] Linking CXX executable entry_test
CMake Error at /usr/share/cmake/Modules/GoogleTestAddTests.cmake:112 (message):
  Error running test executable.

    Path: '/home/dan/.cache/yay/dwarfs/src/build/error_test'
    Working directory: '/home/dan/.cache/yay/dwarfs/src/build'
    Result: Segmentation fault
    Output:
      

Call Stack (most recent call first):
  /usr/share/cmake/Modules/GoogleTestAddTests.cmake:226 (gtest_discover_tests_impl)


make[2]: *** [CMakeFiles/error_test.dir/build.make:159: error_test] Error 1
make[2]: *** Deleting file 'error_test'
make[1]: *** [CMakeFiles/Makefile2:1383: CMakeFiles/error_test.dir/all] Error 2
[ 95%] Linking CXX executable universal/dwarfs-universal
[ 95%] Built target dwarfsuniversal
CMake Error at /usr/share/cmake/Modules/GoogleTestAddTests.cmake:112 (message):
  Error running test executable.

    Path: '/home/dan/.cache/yay/dwarfs/src/build/entry_test'
    Working directory: '/home/dan/.cache/yay/dwarfs/src/build'
    Result: Segmentation fault
    Output:
      

Call Stack (most recent call first):
  /usr/share/cmake/Modules/GoogleTestAddTests.cmake:226 (gtest_discover_tests_impl)


make[2]: *** [CMakeFiles/entry_test.dir/build.make:159: entry_test] Error 1
make[2]: *** Deleting file 'entry_test'
make[1]: *** [CMakeFiles/Makefile2:1338: CMakeFiles/entry_test.dir/all] Error 2
@mhx
Copy link
Owner

mhx commented May 2, 2024

Thanks for the report.

I saw this myself shortly after releasing v0.9.9. I might have set the default for DISABLE_MOLD to ON if I had noticed this earlier.

I think this is a bug in mold and I've reported it here. It looks like there's already a fix, but it has yet to be released.

@mhx
Copy link
Owner

mhx commented May 3, 2024

This is fixed in mold-2.31.0.

It is also independently fixed in dwarfs-0.9.9-2 (AUR) by disabling the use of mold when building.

@mhx mhx closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants