Bug 21857 – TypeInfo_Array.compare can give wrong result when either array exceeds 2GB

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-04-24T02:02:45Z
Last change time
2021-05-12T16:37:34Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2021-04-24T02:02:45Z
Current code: https://github.com/dlang/druntime/blob/b4209f33e7705a58d101e5ba906bfa5d10799faa/src/object.d#L918-L934 --- override int compare(in void* p1, in void* p2) const { void[] a1 = *cast(void[]*)p1; void[] a2 = *cast(void[]*)p2; // ... return cast(int)a1.length - cast(int)a2.length; } --
Comment #1 by dlang-bot — 2021-04-24T02:06:07Z
@n8sh created dlang/druntime pull request #3450 "TypeInfo_Array.compare can give wrong result when either array exceeds 2GB" fixing this issue: - Fix 21857: TypeInfo_Array.compare can give wrong result when either array exceeds 2GB https://github.com/dlang/druntime/pull/3450
Comment #2 by dlang-bot — 2021-04-26T23:10:11Z
dlang/druntime pull request #3450 "TypeInfo_Array.compare can give wrong result when either array exceeds 2GB" was merged into stable: - 93741516a95e8d1a76290c94a7dd9d608d2660b0 by Nathan Sashihara: Fix 21857: TypeInfo_Array.compare can give wrong result when either array exceeds 2GB https://github.com/dlang/druntime/pull/3450
Comment #3 by dlang-bot — 2021-05-12T16:37:34Z
dlang/druntime pull request #3468 "merge stable" was merged into master: - e70d111cda2c8009028a985c9ef383b8f759af32 by Nathan Sashihara: Fix 21857: TypeInfo_Array.compare can give wrong result when either array exceeds 2GB https://github.com/dlang/druntime/pull/3468