D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19675 - Just calling an empty @safe function crashes the program on Linux x86 - wrong code gen?
Summary: Just calling an empty @safe function crashes the program on Linux x86 - wrong...
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Linux
: P1 major
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-13 22:52 UTC by thomas.bockman
Modified: 2022-06-07 11:55 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description thomas.bockman 2019-02-13 22:52:35 UTC
This do-nothing program crashes for me on 32-bit x86, even in debug mode:
"Program exited with code -11"
DMD 2.084.1 and LDC 1.13.0 are both affected.

Wrong code gen, I'm guessing?
/////////////////////////////
@safe:

align(8u) struct A {
    long x;
}

void f(int i, A a) { }

void main() {
    f(0, A.init);
}
Comment 1 RazvanN 2019-02-21 10:25:25 UTC
I cannot reproduce this. Is this bug still present?
Comment 2 mhh 2022-06-07 11:55:43 UTC
Closing this because I can't reproduce. Please reopen with more information about your system if it actually persists.