Minimal hello world program. This causes linker warnings when compiled with dmd -m32 -run hello.d but successfully completes.
application/x-dsrc
65
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