www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22854] New: static foreach byCodepoint segfault (2.099-rc.1)

https://issues.dlang.org/show_bug.cgi?id=22854

          Issue ID: 22854
           Summary: static foreach byCodepoint segfault (2.099-rc.1)
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: default_357-line yahoo.de

import std.uni;

void main()
{
    static foreach (ch; unicode.Control.byCodepoint) { }
}

This segfaults on DMD 2.099-rc.1.

From looking at the longer DMD debug mode backtrace on master, there seems to
be a stack variable destructor call that reads dead stack memory? --
Mar 07 2022