Bug 22460 – -lowmem causes segfault on OpenBSD 64-bit

Status
RESOLVED
Resolution
INVALID
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Other
Creation time
2021-10-31T20:43:56Z
Last change time
2021-12-11T00:39:32Z
Assigned to
No Owner
Creator
Brian Callahan

Attachments

IDFilenameSummaryContent-TypeSize
1830openbsd-auto-tester-test.txtauto-tester-test output on OpenBSDtext/plain3641

Comments

Comment #0 by bcallah — 2021-10-31T20:43:56Z
Created attachment 1830 auto-tester-test output on OpenBSD I learned about auto-tester-test from Iain today at Beerconf. Tried it on OpenBSD. It fails immediately. I'm not sure what it is trying to tell me though, so it is difficult to make progress on fixing the problem. Help appreciated. Log attached.
Comment #1 by moonlightsentinel — 2021-11-01T13:56:23Z
The failure occurs when compiling the unittests of the test tools `d_do_test.d`. The stack trace suggests that it's a a failure in the frontend which is quite surprising. Might be a memory corruption introduced by the GC given that the unittests are built with `-lowmem`. Check whether -lowmem makes a difference, i.e. if the following succeeds: dmd -m64 -fPIC -g -i -Itools -version=NoMain -unittest tools/d_do_test.d
Comment #2 by bcallah — 2021-11-02T11:35:57Z
Yes, your command succeeded. I was even able to run the resulting program and got: 1 modules passed unittests
Comment #3 by bcallah — 2021-11-02T11:40:15Z
Further analysis suggests that using -lowmem immediately segfaults full stop no matter what you are compiling with dmd on 64-bit OpenBSD DMD. I did not even think to check it because -lowmem works fine on 32-bit OpenBSD DMD. So this is a bug specifically on 64-bit OpenBSD DMD.
Comment #4 by bcallah — 2021-12-11T00:39:32Z
This ended up being a problem on my system, not a problem with DMD. Nothing needing fixing, DMD is working fine.