Bug 15455 – [REG v2.065] Compiler segfault for simple nested structure

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2015-12-16T10:12:00Z
Last change time
2016-03-22T04:05:13Z
Keywords
C++
Assigned to
nobody
Creator
saurabh.das

Comments

Comment #0 by saurabh.das — 2015-12-16T10:12:39Z
struct xlref { ushort rwFirst; ushort rwLast; ubyte colFirst; ubyte colLast; } struct xlmref { ushort count; xlref reflist; } Mac OS X (dmd 2.069.0) =================== dmd dprob.d Segmentation fault: 11 Windows (dmd 2.069.2) ================== dmd -v -m64 dprob.d binary C:\D\dmd2\windows\bin\dmd.exe version v2.069.2 config C:\D\dmd2\windows\bin\sc.ini parse xlcall_wrap2 importall xlcall_wrap2 import object (C:\D\dmd2\windows\bin....\src\druntime\import\object.d) semantic xlcall_wrap2 object.Error@(0): assert(0) or HLT instruction 0x0040496F 0x00404CF8 0x004CF2B6 0x004565A7 0x0044EAB0 0x004BF99E 0x74F757F9 in MultiByteToWideChar 0x76F2139E in RtlQueryProcessDebugInformation 0x76F21340 in RtlQueryProcessDebugInformation 0x76F21190 in RtlQueryProcessDebugInformation WORKAROUNDS =========== Hope this helps in debugging. See http://forum.dlang.org/post/[email protected] 1) Changing the order of the members of xlmref seems to be a workaround: struct xlmref { xlref reflist; ushort count; } 2) Changing the 2x ubyte to ubyte[2] seems to be a workaround: struct xlref { ushort rwFirst; ushort rwLast; ubyte[2] cols; }
Comment #1 by adrian — 2015-12-16T10:27:33Z
Changed OS to All, as it also affects Linux.
Comment #2 by schuetzm — 2015-12-16T16:02:10Z
It's a regression. This is the breaking change, according to digger: commit 868506fed68eea36bf6055ea7579922b6a1e12c2 Author: Andrei Alexandrescu <[email protected]> Date: Mon Mar 10 17:01:05 2014 -0700 dmd: Merge pull request #3372 from WalterBright/fix5570 https://github.com/D-Programming-Language/dmd/pull/3372 partial fix for Issue 5570
Comment #3 by bugzilla — 2016-03-20T00:51:14Z
Comment #4 by github-bugzilla — 2016-03-20T05:13:33Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/414e10b3e3f5ecfa58b5be24c5e490a43281510f fix Issue 15455 - [REG v2.065] Compiler segfault for simple nested structure https://github.com/D-Programming-Language/dmd/commit/c30a55a31e97f7eb8ba80a578ec4a6a6386b5679 Merge pull request #5551 from 9rnsr/fix15455 [REG v2.065] Issue 15455 - Compiler segfault for simple nested structure
Comment #5 by github-bugzilla — 2016-03-22T04:05:13Z