[dmd-internals] [D-Programming-Language/dmd] 48ed15: Remove import of std.random:rand from test22

Don Clugston dclugston at googlemail.com
Mon Aug 22 23:59:27 PDT 2011


On 23 August 2011 00:41, Walter Bright <walter at digitalmars.com> wrote:
>
>
> On 8/22/2011 3:29 PM, Don Clugston wrote:
>>
>> On 16 August 2011 20:08, Brad Roberts<braddr at puremagic.com>  wrote:
>>>
>>> On Tuesday, August 16, 2011 4:41:30 AM, Don Clugston wrote:
>>>>
>>>> I've added it to bugzilla.
>>>> http://d.puremagic.com/issues/show_bug.cgi?id=6505
>>>>
>>>> On 16 August 2011 04:20, Jonathan M Davis<jmdavisProg at gmx.com>  wrote:
>>>>>
>>>>> On Tuesday, August 16, 2011 04:16:10 Don Clugston wrote:
>>>>>>
>>>>>> And now it fails on all platforms with -O. Yikes.  It seems that the
>>>>>> original bug was never actually fixed. It's an optimizer bug, too.
>>>>>> We've been running with a defective test case for years.
>>
>> Walter -- are you working on fixing this?
>> If not, I'll have a go at it. It looks like a failure to spill FP
>> registers, and I don't think the backend currently has any capability
>> to spill, so a fix is probably not easy.
>> A quick hack fix would be to disable optimisation entirely when this
>> happens.
>>
>
> The backend does spill the x87 stack when it overflows. I suspect the
> problem may lie in the scheduler. This is easily checked by disabling the
> scheduler and trying it.

You're right, it's the scheduler. It loads 8 values on the x87 stack,
then does fdecstp.
Then, the 9th load lands on top of an existing value, causing a stack
overflow exception. The loaded value gets turned into a NaN.
I'll try to track it down further.


More information about the dmd-internals mailing list