ldc icon indicating copy to clipboard operation
ldc copied to clipboard

emsi-containers: ldc-master crash on tests

Open kassane opened this issue 7 months ago • 3 comments

CI build (long log): https://github.com/kassane/containers/actions/runs/15140489580

DMD-master: ✅ ldc2-master: ❌ (aborted)

kassane avatar May 20 '25 18:05 kassane

I can't even download these huge logs. - Maybe just out of memory if the compiler crashes?

kinke avatar May 20 '25 19:05 kinke

ldc2-1.40.1 CI: https://github.com/kassane/containers/actions/runs/15161974372 get error:

 ldc2: Unknown command line argument '-debug'.  Try: '/Users/runner/hostedtoolcache/ldc2/1.40.1/arm64/ldc2-1.40.1-osx-universal/bin/ldc2 --help'
ldc2: Did you mean '--d-debug'?
make: *** [test] Error 1

ldc2-master, crashes by wrong flag?

How to reproduce

git clone https://github.com/dlang-community/containers && cd containers/test
ldc2 -i -unittest -main -g -cov -I../src/ -debug -wi -m32 ../src/containers/cyclicbuffer.d ../src/containers/dynamicarray.d ../src/containers/hashmap.d ../src/containers/hashset.d ../src/containers/immutablehashset.d ../src/containers/internal/backwards.d ../src/containers/internal/element_type.d ../src/containers/internal/hash.d ../src/containers/internal/mixins.d ../src/containers/internal/node.d ../src/containers/internal/storage_type.d ../src/containers/openhashset.d ../src/containers/package.d ../src/containers/simdset.d ../src/containers/slist.d ../src/containers/treemap.d ../src/containers/ttree.d ../src/containers/unrolledlist.d -oftests_32

Edit: in local test replacing DC=ldc2 to DC=ldmd2 or -debug to --d-debug [for ldc2], no crash compiler.

kassane avatar May 21 '25 12:05 kassane

Oh, this is weird, apparently some option inherited from LLVM:

$ ~/dlang/ldc2-e20e2064-linux-x86_64/bin/ldc2 -c ../hello.d -help-hidden | grep -- '--debug'
  --debug                                                                    - Enable debug output
  --debug-ata-coalesce-frags                                                 -
…
$ ~/dlang/ldc-1.41.0-beta1/bin/ldc2 -c ../hello.d -help-hidden | grep -- '--debug'
  --debug-ata-coalesce-frags                                                 - 
…

Both versions are using LLVM v19.1.7. I guess it's only the assertions-enabled LLVM build (used for the master and PR builds) that exposes this option.

So I guess it's LLVM that crashes with that option.

kinke avatar May 21 '25 13:05 kinke