Bug 18485 – dmd generates a binary that throws SIGSEGV when using interface files (di) importing modules

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2018-02-21T17:13:37Z
Last change time
2024-12-13T18:57:13Z
Assigned to
No Owner
Creator
Diego
Moved to GitHub: dmd#19393 →

Comments

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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19393 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB