Bug 20364 – [REG2.069] changing length for typeof(null)[] array seg faults in _d_arraysetlengthiT()

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-11-06T17:35:01Z
Last change time
2019-12-08T09:15:12Z
Keywords
pull
Assigned to
No Owner
Creator
Suleyman Sahmi (سليمان السهمي)

Comments

Comment #0 by sahmi.soulaimane — 2019-11-06T17:35:01Z
Test case: ``` void main() { typeof(null)[] result; result.length = 1; } ```
Comment #1 by bugzilla — 2019-12-08T04:51:50Z
Is this really a regression? When did it ever work?
Comment #2 by bugzilla — 2019-12-08T06:48:29Z
It's seg faulting in __memcpy()_sse2_unaligned called from _d_arraysetlengthiT().
Comment #3 by dlang-bot — 2019-12-08T07:38:48Z
@WalterBright created dlang/druntime pull request #2860 "fix Issue 20364 - [REG2.069] changing length for typeof(null)[] array…" fixing this issue: - fix Issue 20364 - [REG2.069] changing length for typeof(null)[] array seg faults in _d_arraysetlengthiT() https://github.com/dlang/druntime/pull/2860
Comment #4 by dlang-bot — 2019-12-08T09:15:12Z
dlang/druntime pull request #2860 "fix Issue 20364 - [REG2.069] changing length for typeof(null)[] array…" was merged into master: - 8a7f4d4c9b3e4a4f796f6577591725f59c60eda7 by Walter Bright: fix Issue 20364 - [REG2.069] changing length for typeof(null)[] array seg faults in _d_arraysetlengthiT() https://github.com/dlang/druntime/pull/2860