www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6234] New: 64-bit array append generates inline code to copy new data, but does not call postblit

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

           Summary: 64-bit array append generates inline code to copy new
                    data, but does not call postblit
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: schveiguy yahoo.com



05:38:11 PDT ---
The 64-bit compiler no longer calls _d_arrayappendT directly, it now calls
_d_arrayappendCTX, which does *not* copy the new data to the array.

This is fine, because the compiler generates the necessary code to copy the new
data.  However, the compiler does *not* call postblit on that data.

Two ways to fix this:

1. Simply switch to calling _d_arrayappendT again, and don't do the copying
inline.
2. Insert a call to __doPostblit (or whatever you want to rename it, it's in
rt/lifetime.d) after copying the data, but only if the type *has* a valid
postblit.

This is the reason the runtime is currently failing unit tests on 64-bit code.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 01 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6234


Brad Roberts <braddr puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |braddr puremagic.com
           Severity|major                       |blocker



---
Raising to a blocker, the next release shouldn't ship with this still broken.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 01 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6234


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch, wrong-code
                 CC|                            |yebblies gmail.com




 Raising to a blocker, the next release shouldn't ship with this still broken.
I have a fix for this, but I don't have a 64 bit platform to test it on. Can anybody run it through the test suite on x86-64 for me? https://github.com/yebblies/dmd/tree/issue6234 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 04 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6234


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



10:49:03 PDT ---
Added yebblie's fix as
https://github.com/D-Programming-Language/dmd/commit/3a872937f714214d79c987c2ebef068c0a29285e

Needed to add code to account for side effects.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 05 2011