Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Problems with registers save/restore on context switch?

64/32 would explain a bug, but not likely this sort of rare intermittency.

I found what is probably the same problem some time back, also with
floating point, and narrowed down the problem to a particular mod
to NetBSD kernel between may 1, and may 3, 2011. Matt Thomas made some
major changes to the CPU handling at that time. I ubmit that those
changes are problematic, and your little C test case could be very
helpful in tracking this down. My test case is big, ugly,
and can take hours to run.

(see thread: "Confidence: Chopping between 5.2 and 6.0.1")

Can you provide me with the test case? I'll run it here.


>On Tue, Dec 17, 2013 at 11:18:51PM +0400, Valery Ushakov wrote:
>> Attached program converts time_t t = 1; with gmtime_r(3) in a loop and
>> checks tm_year of the result, expecting 70.  Sometimes (rarely) it
>> will see bogus results.
>> The two most frequent bad times are
>>     2038-01-19T03:14:08 (t =  0x80000000)
>> and 1901-12-13T20:45:53 (t = -0x7fffffff)
>I'm not familiar with modern PPC variants and our calling convention,
>but you shoud make explicit whether this is 32 or 64bit time_t,
>especially whether kernel and userland agree.
>       -is

Home | Main Index | Thread Index | Old Index