9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] runtime error
@ 2005-06-03 12:23 pac7
  2005-06-03 13:34 ` Charles Forsyth
  0 siblings, 1 reply; 2+ messages in thread
From: pac7 @ 2005-06-03 12:23 UTC (permalink / raw)
  To: 9fans

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.




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] runtime error
  2005-06-03 12:23 [9fans] runtime error pac7
@ 2005-06-03 13:34 ` Charles Forsyth
  0 siblings, 0 replies; 2+ messages in thread
From: Charles Forsyth @ 2005-06-03 13:34 UTC (permalink / raw)
  To: 9fans

>>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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-03 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-03 12:23 [9fans] runtime error pac7
2005-06-03 13:34 ` Charles Forsyth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).