Bug 24545 – Problems with m32 mode on Linux

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2024-05-08T00:34:11Z
Last change time
2024-12-13T19:35:12Z
Assigned to
No Owner
Creator
erikas.aubade
Moved to GitHub: dmd#20453 →

Attachments

IDFilenameSummaryContent-TypeSize
1913sdlcrash.dMinimal example to cause a segfault with bindbc. Execute with dub run --single sdlcrash.d --compiler=dmd --arch=x86application/x-dsrc144
1914hello.dMinimal hello world program. This causes linker warnings when compiled with dmd -m32 -run hello.d but successfully completes.application/x-dsrc65

Comments

Comment #0 by erikas.aubade — 2024-05-08T00:34:11Z
Created attachment 1913 Minimal example to cause a segfault with bindbc. Execute with dub run --single sdlcrash.d --compiler=dmd --arch=x86 There seems to be some sort of weirdness with the output generated by DMD in m32 mode. I initially stumbled on the problem while trying to use bindbc-sdl in dynamic mode--attempting to load the DLL causes a segfault. I've attached a minimal testcase to illustrate this, and can be executed with dub run --single sdlcrash.d --compiler=dmd --arch=x86 This problem doesn't happen in x86_64 mode, or with LDC or GDC in x86 mode. Furthermore, it generates some linker warnings about relocations in read-only sections and creating DT_TEXTREL in a PIE. These warnings seem to be generated with code I feed the compiler, even a trivial hello world--which I'm attaching. The hello world example does not segfault, however.
Comment #1 by erikas.aubade — 2024-05-08T00:34:52Z
Created attachment 1914 Minimal hello world program. This causes linker warnings when compiled with dmd -m32 -run hello.d but successfully completes.
Comment #2 by robert.schadek — 2024-12-13T19:35:12Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20453 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB