[Issue 24512] New: DMD writeln with malloc allocated slice crashes lld

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 19 15:55:51 UTC 2024


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

          Issue ID: 24512
           Summary: DMD writeln with malloc allocated slice crashes lld
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: msnmancini at hotmail.com

```d
void main()
{
        import core.stdc.stdlib;
    import std.stdio;
    char[] s = (cast(char*)malloc(64))[0..64];
    s[] = 'a';
    writeln(s);
    s[] = 'b';
    writeln(s);
}
```

Having support for lld linker would be actually nice since one would be able to
have a faster linker support for DMD.

--


More information about the Digitalmars-d-bugs mailing list