Bug 14853 – [REG2.066] DMD segfaults with the cast from mutable struct new to shared

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-08-01T04:54:00Z
Last change time
2015-08-05T01:30:12Z
Keywords
ice, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2015-08-01T04:54:22Z
From: http://forum.dlang.org/thread/[email protected] Tweaked test case: struct sQueue(T) { struct sNode { T mfPayload = T.init; union { typeof(this)* mfPrev; shared(typeof(this)*) mfShPrev; } union { typeof(this)* mfNext; shared(typeof(this)*) mfShNext; } } sNode mfRoot; void pfPut(T v, sNode* r = null) { shared n = new sNode(v); // problem! } } void main() { auto b1 = new sQueue!uint; }
Comment #1 by k.hara.pg — 2015-08-01T04:57:22Z
I confirmed that this is a regression from 2.066.
Comment #2 by k.hara.pg — 2015-08-01T05:04:25Z
Comment #3 by github-bugzilla — 2015-08-01T20:10:25Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/30edcc2664f243f86861aee2483dbb20ddc9a77a fix Issue 14853 - DMD segfaults with the cast from mutable struct new to shared https://github.com/D-Programming-Language/dmd/commit/6be38b76e5ce9dcb90886d1e18cdaada172c7393 Merge pull request #4853 from 9rnsr/fix14853 [REG2.066] Issue 14853 - DMD segfaults with the cast from mutable struct new to shared
Comment #4 by github-bugzilla — 2015-08-05T01:30:12Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/30edcc2664f243f86861aee2483dbb20ddc9a77a fix Issue 14853 - DMD segfaults with the cast from mutable struct new to shared https://github.com/D-Programming-Language/dmd/commit/6be38b76e5ce9dcb90886d1e18cdaada172c7393 Merge pull request #4853 from 9rnsr/fix14853