[9fans] runtime error

  • Follow


Hi,
I got this error message:

mem user overflow
pool sbrkmem block 3f548
hdr 0a110c09 00000020 000076d7 00000000 31514553 faf00030
tail 0a110c09 00000020 000076d7 00000000 31514553 faf00030 |
ef1300be 00000020


caused by this line of code:
      for(nptr=&n->father->childs; *nptr!=n;
nptr=&(*nptr)->brother) /* here bug */

Could someone, please, explain me in plain words (or more
verbosely) what mihgh had happened? The prog runs OK with
gcc/linux/386, but this native 8c/plan9 port crashes, with
exactly the same numbers every run, even thought there's a random
number generator inside guaranteeing every run is a bit different.
not every run crashes, thus.

Thanks, best regards,
++pac.


0
Reply pac7 (25) 6/3/2005 12:23:58 PM

>>mem user overflow

>>hdr 0a110c09 00000020 000076d7 00000000 31514553 faf00030
>>tail 0a110c09 00000020 000076d7 00000000 31514553 faf00030 |

the program has scribbled outside the memory it was allocated
for something on the heap.  plan 9's allocator does some checks
that the others might not do, but in any case, allocator
internals differ enough that a slight overrun
might be noticed by one but not another (eg, because
of extra space allocated for alignment)

see malloc(2) and pool(2) for debugging suggestions
such as increasing the checks that are made to allow
it to be caught nearer the actual error.
0
Reply forsyth (1219) 6/3/2005 1:35:29 PM


1 Replies
12 Views

(page loaded in 0.135 seconds)


Reply: