Bug 19811 – Program crashes with null pointer with lld-link, works with MS linker
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-04-17T15:01:27Z
Last change time
2019-04-17T22:42:44Z
Assigned to
No Owner
Creator
Adam D. Ruppe
Comments
Comment #0 by destructionator — 2019-04-17T15:01:27Z
Forwarding a bug reported on my lib to here because it only happens with the lld-link, not with optlink nor MS link.
https://github.com/adamdruppe/arsd/issues/189
import arsd.image, arsd.simpledisplay;
void main()
{
SimpleWindow window = new SimpleWindow(1000, 600, "Neuron");
Image core = Image.fromMemoryImage(loadImageFromFile("core.png"));
window.eventLoop(0);
}
If you swap the window and image lines, it works. The specific file is irrelevant. All necessary libs are in my git thing, so if you download it all, `dmd -i -m64 test.d` will compile it.
The comments on the github link are me mostly being bewildered until I realized the linker might be the difference between our setups, so you might want to skip ahead in comments.
I don't know what it minimizes to; I'm posting this mostly so I can say "not my problem" and close that issue lol.
Comment #1 by greeenify — 2019-04-17T21:21:19Z
We recently (last Sunday) upgraded from lld 5 to lld 7, so it might be worth giving DMD master a try.
Comment #2 by destructionator — 2019-04-17T22:42:44Z
Yes! I tried the dmd nightly zip and it does appear to have worked. spendid :)