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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 4 00:55:06 UTC 2021


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

apham <apz28 at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |apz28 at hotmail.com

--- Comment #1 from apham <apz28 at hotmail.com> ---
This construct will cause the function to pass fixed length array
ubyte[4194304] and construct struct CRC(uint N, ulong P) with N=64u &
P=15564440312192434176LU hence stack overflow. Change to dynamic array
construct should fix the problem

ubyte[4] pcrc = buffer[].crc32Of();

--


More information about the Digitalmars-d-bugs mailing list