www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10457] New: _d_toObject might fail with shared libraries

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10457

           Summary: _d_toObject might fail with shared libraries
           Product: D
           Version: unspecified
          Platform: x86
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody puremagic.com
        ReportedBy: code dawg.eu


--- Comment #0 from Martin Nowak <code dawg.eu> 2013-06-23 18:48:14 PDT ---
This happens because the function uses a heuristic to distinguish Objects from
Interfaces which depends on Interface.offset < 0x1_0000. With shared libraries
the Object.classname.ptr can be located above 0x8000_0000 and subsequently the
signed comparison in rt.cast_._d_toObject fails.
https://github.com/D-Programming-Language/druntime/blob/e3750be8beca690225d980b60f9879d6f913eed4/src/rt/cast_.d#L39

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 23 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10457



--- Comment #1 from github-bugzilla puremagic.com 2013-06-30 03:24:49 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/0c4d2ed412f2062e7821249d1fb33797469926ef
fix Issue 10457 - _d_toObject might fail with shared libraries

- Interface.offset can't be negative so it should be an unsigned value

https://github.com/D-Programming-Language/druntime/commit/8d2d60f644e67a2c5f9533f5333e1167b127ebce
Merge pull request #529 from dawgfoto/fix10457

fix Issue 10457 - _d_toObject might fail with shared libraries

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 30 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10457


Alex Rønne Petersen <alex lycus.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |alex lycus.org
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 30 2013