mold: regression: mold-1.1 produces "illegal hardware instruction" on an open-source project

The project is oneflow (WARNING: this project is large and takes ~20 minutes to build on a 48 cpu core machine). My compile command is

# NOTE: "75" here is the cuda architecture of my device.
# If this value is mismatch to the current cuda device, there will be a runtime error 
# (but not compile/link error) when trying to access gpu.
#
# ccache and ninja are needed, 
# and other dependencies: https://github.com/Oneflow-Inc/oneflow#option-3-build-on-bare-metal
cmake -C ../cmake/caches/cn/fast/cuda-75.cmake -DCMAKE_BUILD_TYPE=Debug ..
ninja oneflow_py

Downgrading mold to 1.0.0 fixes this problem.

This problem also doesn’t exist when building a pure cpu version.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 24 (11 by maintainers)

Most upvoted comments

I fixed the crash bug in the above commit. Please rebuild mold and try again. Thanks!

The latest mold builds oneflow successfully! Mold is extremely useful and saves a lot of link time. Thanks for your fantastic work!

@rui314 It works, thanks again!

Thanks for your fantastic work! I’ll have a try now