Bug 14401 – typeid(shared X).init is empty for class types

Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-04-03T05:20:00Z
Last change time
2017-07-19T17:42:56Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
andrei

Comments

Comment #0 by andrei — 2015-04-03T05:20:57Z
Consider: class X { int a; } void main() { import std.stdio; writeln(typeid(X).init.length); writeln(typeid(shared(X)).init.length); } The program prints 20 and 0. This is a blocker for work on std.allocator.
Comment #1 by k.hara.pg — 2015-04-03T19:03:54Z
The root problem is in the definition of TypeInfo_Class. So it's a druntime issue. https://github.com/D-Programming-Language/druntime/pull/1205 https://github.com/D-Programming-Language/phobos/pull/3143
Comment #2 by github-bugzilla — 2015-04-03T19:30:53Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/9f68938b8f3420d676e5231867c82101ef5d1c81 Supplemental fix for issue 14401 - Deal with the type change of typeid(ClassType).init to const(void)[] https://github.com/D-Programming-Language/phobos/commit/3ffc006c20d759ad7197eae879cc894f7bb5efbb Merge pull request #3143 from 9rnsr/fix14401 Supplemental fix for issue 14401 - Deal with the type change of typeid(ClassType).init to const(void)[]
Comment #3 by github-bugzilla — 2015-04-03T20:29:23Z
Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/6fa857d5535d52df08fb93ae975ee864101537b0 fix Issue 14401 - typeid(shared X).init is empty for class types `TypeInfo_Class` needs to override `init()` method for the `TypeInfo_Const` and its derived TypeInfo classes. https://github.com/D-Programming-Language/druntime/commit/bd3f4cb2122edd1a7c107f86936c20bba15191b6 Merge pull request #1205 from 9rnsr/fix14401 Issue 14401 - typeid(shared X).init is empty for class types
Comment #4 by github-bugzilla — 2015-04-09T01:08:41Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/94f725f3f56df4257647e348184586a1661f60cf fix root/rmem.d to follow issue 14401 fix in druntime. https://github.com/D-Programming-Language/dmd/commit/7f8f27c9520c559190d5ac366cd337f9ef5c597b Merge pull request #4572 from 9rnsr/fix14401 fix root/rmem.d to follow issue 14401 fix in druntime.
Comment #5 by github-bugzilla — 2015-06-17T21:02:19Z
Comment #6 by github-bugzilla — 2015-06-17T21:04:31Z
Comment #7 by github-bugzilla — 2017-07-19T17:41:19Z
Commits pushed to dmd-cxx at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/6fa857d5535d52df08fb93ae975ee864101537b0 fix Issue 14401 - typeid(shared X).init is empty for class types https://github.com/dlang/druntime/commit/bd3f4cb2122edd1a7c107f86936c20bba15191b6 Merge pull request #1205 from 9rnsr/fix14401
Comment #8 by github-bugzilla — 2017-07-19T17:42:56Z
Commits pushed to dmd-cxx at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/9f68938b8f3420d676e5231867c82101ef5d1c81 Supplemental fix for issue 14401 - Deal with the type change of typeid(ClassType).init to const(void)[] https://github.com/dlang/phobos/commit/3ffc006c20d759ad7197eae879cc894f7bb5efbb Merge pull request #3143 from 9rnsr/fix14401