|
From: Tom H. <th...@cy...> - 2004-10-28 08:45:59
|
In message <Pin...@he...>
Nicholas Nethercote <nj...@ca...> wrote:
> On Thu, 28 Oct 2004, Tom Hughes wrote:
>
>> This led to a number of subtle and hard to locate problems caused by
>> stack based arrays being overflowed by one entry when a node was
>> allocated with the maximum level. As each node only has a one in two
>> million or so chance of getting a level of SK_MAXHEIGHT this didn't
>> actually happen all that often.
>
> Urgh... well spotted.
It took a while to work out what was going on. I had it failing in
unmap_range but every time I changed the code to print more details
it stopped happening. That turned out to be because SkipList_Remove
was corrupting the stacked copy of ebx which unmap_range was using
to store the value of s which is used in the assertion that was
firing. Unfortunately changing unmap_range tended to mean it used
a different register and the assertion no longer triggered...
Plus it usually took 5-10 minutes for the assertion to fire even when
the code was right to trigger it. I eventually worked it out late last
night and left that test running overnight to make sure I really had
got it.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|