D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 14853 - [REG2.066] DMD segfaults with the cast from mutable struct new to shared
Summary: [REG2.066] DMD segfaults with the cast from mutable struct new to shared
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords: ice, pull
Depends on:
Blocks:
 
Reported: 2015-08-01 04:54 UTC by Kenji Hara
Modified: 2015-08-05 01:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2015-08-01 04:54:22 UTC
From: http://forum.dlang.org/thread/xupmxlqobvwvquznzdiw@forum.dlang.org

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 Kenji Hara 2015-08-01 04:57:22 UTC
I confirmed that this is a regression from 2.066.
Comment 3 github-bugzilla 2015-08-01 20:10:25 UTC
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 github-bugzilla 2015-08-05 01:30:12 UTC
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