Bug 17874 – Segmentation fault when constructing a struct with a static array of structs containing floats

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-10-02T22:24:49Z
Last change time
2018-03-27T23:44:13Z
Keywords
industry, wrong-code
Assigned to
No Owner
Creator
briancschott

Comments

Comment #0 by briancschott — 2017-10-02T22:24:49Z
test.d: --------------------------- struct ProfitCoef { float f = 0f; double d = 0.0; } struct TheStruct { ulong a; ProfitCoef[1] b; } void main() { auto t = TheStruct(0); } --------------------------- $ rdmd test.d Segmentation fault (core dumped)
Comment #1 by bugzilla — 2018-03-27T22:50:55Z
Comment #2 by github-bugzilla — 2018-03-27T23:44:12Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/5662aa94c091083f004530d7ed77ec42a93414a4 Fix issue 17874 - Static arrays & memset Hopefully completes what #3784 started. https://github.com/dlang/dmd/commit/161e2e038a656f8d849967821cb0c35a77386d32 Merge pull request #8092 from LemonBoy/b17874 Fix issue 17874 - Static arrays & memset merged-on-behalf-of: Walter Bright <[email protected]>