Comment #0 by diego.lago.gonzalez — 2018-02-21T17:13:37Z
D compiler (dmd) generates a binary file (test program) that throws a SIGSEGV when it is linked against a library (*.so) using an interface file (*.di) instead of a source file (*.di) when importing the library API (module).
Compiling the library is made with or without -H option to generate or not the interface file (*.di). After that, the test program is compiled against the library importing the source file (*.d).
With this import, [as stated in documentation](https://dlang.org/dmd-linux.html#interface-files), `dmd` uses interface files before source files if they are present.
And, when the test program is compiled using that interface file, that program throws a SIGSEGV on every run.
Repository with a proof of concept: https://github.com/diegolagoglez/dmd-sigsegv-using-di-proof-of-concept
Comment #1 by diego.lago.gonzalez — 2019-01-02T11:58:47Z
Still fails using dmd 2.084.0.
Comment #2 by robert.schadek — 2024-12-13T18:57:13Z