[Issue 21599] New: std.digest.crc : crc32Of fails with SefFault on array of 4MB or larger

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 31 19:13:32 UTC 2021


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

          Issue ID: 21599
           Summary: std.digest.crc : crc32Of fails with SefFault on array
                    of 4MB or larger
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: stojkovic.igor at gmail.com

Following code fails with SegFault:

```
module test.main;

private __gshared ubyte[4096 * 1024] buffer;

int main(string[] args)
{
    import std.digest.crc : crc32Of;
    ubyte[4] pcrc = buffer.crc32Of(); // SegFault reported here
    return pcrc[0];
}
```

Tried with DMD 2.095.0 and LDC 1.24.0.

--


More information about the Digitalmars-d-bugs mailing list