Bug 13404 – heap-allocating a struct passes TypeInfo_Pointer to the GC, not TypeInfo_struct

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-08-30T14:38:32Z
Last change time
2018-01-14T22:19:41Z
Keywords
pull
Assigned to
No Owner
Creator
Rainer Schuetze

Comments

Comment #0 by r.sagitario — 2014-08-30T14:38:32Z
When allocating a struct instance with "new", the compiler generates a call to _d_newitemT/_d_newitemiT, with the type info of the pointer to the struct as an argument. This type info is passed as is to the GC as a description, but should pass ti.next.
Comment #1 by r.sagitario — 2014-08-30T14:48:32Z
Comment #2 by github-bugzilla — 2014-08-31T09:37:44Z
Commit pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/d0bba643e9a6c40c56d84098ae024fde6eed9a66 Merge pull request #941 from rainers/fix_13404 Issue 13404 - heap-allocating a struct passes TypeInfo_Pointer to the GC, not TypeInfo_struct
Comment #3 by github-bugzilla — 2014-08-31T09:37:47Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/048f0cca0667d42a5b71a90eae2a7a39f42f95f2 Merge pull request #3935 from rainers/fix_13404 Issue 13404 - heap-allocating a struct passes TypeInfo_Pointer to the GC, not TypeInfo_struct
Comment #4 by github-bugzilla — 2015-02-18T03:37:46Z
Comment #5 by r.sagitario — 2018-01-14T22:19:41Z
fixed in dmd 2.067