[D-runtime] auto-tester failing, local test passing

Brad Roberts braddr at puremagic.com
Tue Jun 21 13:55:41 PDT 2011


On 6/21/2011 8:55 AM, Steve Schveighoffer wrote:
> 
>> On 6/21/2011 5:55 AM, Steve Schveighoffer wrote:
>>> In the latest commit I just pulled (druntime pull request 29), the auto tester is now failing one of the unit tests.
>>>
>>> However, on my local box (Linux 32-bit), the test passes...
>>>
>>> I'm testing with dmd 2.053, and I think the auto-tester tests with the dmd out of github.  So that's the only thing I
>>> can think of.  I was told that phobos/druntime developers should not be using the HEAD dmd, they should be using the
>>> last released one.  Is this still true?
>>>
>>> Sorry about the break, I hope I can figure out why soon.
>>>
>>> -Steve
>>
>> The auto-tester always tests with the most recent submit of all three parts.  That's how releases are done so that's
>> what needs to be tested.  For the most part, attempts are made to minimize the cross-package damage as changes are made,
>> which helps minimize the number of times that upper layer developers HAVE to test with tip of everything, but that's not
>> always the case.
> 
> OK, it looks like in this case it might have nothing to do with using HEAD, since I noticed after sending this message that the 32-bit tests are passing.  It looks more like a 64-bit problem, and I'm not sure if it's something I'm doing or not, I don't have a 64-bit box to test with.  I would suspect it might have something to do with the way I'm checking to see if the TypeInfo has overridden postblit.
> 
> 
> I'll continue to test with the latest released dmd, unless it starts failing unit tests against the HEAD phobos/druntime.  I think that's probably the more reliable option.
> 

There's an important difference between 32 and 64 that matters here.  The druntime call chains:

on 32:

_d_arrayappendcT
  _d_arrayappendT
    _d_arrayappendcTX
      __doPostblit
    __doPostblit

on 64:

_d_arrayappendcTX
  __doPostblit

The problem is that part of the logic for array appending was moved from the runtime to the compiler's codegen process
for 64 bits.  So the compiler needs to be taught to run the postblit after calling _d_arrayappendcTX or that work moved
back to the runtime.  The reasons to switch from _d_arrayappendcT to the TX version were to avoid the complexities of
vararg calling.

That code is in e2ir.c, search for RTLSYM_ARRAYAPPENDCTX.


More information about the D-runtime mailing list