9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Do the Pool Voodoo like I do
@ 2004-02-20  1:07 David Presotto
  2004-02-22  1:09 ` Russ Cox
  0 siblings, 1 reply; 5+ messages in thread
From: David Presotto @ 2004-02-20  1:07 UTC (permalink / raw)
  To: dbailey27, 9fans

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

You're running past the allocated memory.  'mem user overflow' means that
malloc detected that your program has written past the end of the allocated buffer.
It can do this because it actually may 'overallocate', i.e., allocating more memory
than you asked for.  It puts a predetermined pattern in the extra bytes.  If it
finds  that pattern has been altered, it complains its little ass off.

[-- Attachment #2: Type: message/rfc822, Size: 2861 bytes --]

From: dbailey27@ameritech.net
To: 9fans@cse.psu.edu
Subject: [9fans] Do the Pool Voodoo like I do
Date: Thu, 19 Feb 2004 19:52:58 -0500
Message-ID: <8a1ec9efc59551c37ee2638fb0d006c1@yourdomain.dom>

Hey all,
	I'm having a bit of trouble with the malloc
library. I've got an algorithm that dynamically
allocates memory char by char using realloc in
a loop. However, the lib seems to be having some
internal problem. I've got seriously unoptimized
code handling the token stream this algorithm
parses, so there are two cases for the crash below:
	1) my unoptimized code is allocating too much
	    heap and that's causing the panic
	2) there is an internal alloc bug that I'm triggering

Here's the panic info:

mem user overflow
pool sbrkmem block d9a0
hdr 0a110c09 00000020 000023b5 00001f3e 0023ff24 caf0f1fe
tail 0a110c09 00000020 000023b5 00001f3e 0023ff24 caf0f1fe | ef1500be 00000020
user data 00 3e 1f 00  00 24 ff 23 | 00 fe f1 f0  ca be 00 15
panic: pool panic
8.out 703: suicide: sys: trap: fault read addr=0x0 pc=0x000065fb
apple%

Any ideas? More info provided on request.

Don (north_)

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [9fans] Do the Pool Voodoo like I do
@ 2004-02-20  0:52 dbailey27
  2004-02-20  1:07 ` Geoff Collyer
  0 siblings, 1 reply; 5+ messages in thread
From: dbailey27 @ 2004-02-20  0:52 UTC (permalink / raw)
  To: 9fans

Hey all,
	I'm having a bit of trouble with the malloc
library. I've got an algorithm that dynamically
allocates memory char by char using realloc in
a loop. However, the lib seems to be having some
internal problem. I've got seriously unoptimized
code handling the token stream this algorithm
parses, so there are two cases for the crash below:
	1) my unoptimized code is allocating too much
	    heap and that's causing the panic
	2) there is an internal alloc bug that I'm triggering

Here's the panic info:

mem user overflow
pool sbrkmem block d9a0
hdr 0a110c09 00000020 000023b5 00001f3e 0023ff24 caf0f1fe
tail 0a110c09 00000020 000023b5 00001f3e 0023ff24 caf0f1fe | ef1500be 00000020
user data 00 3e 1f 00  00 24 ff 23 | 00 fe f1 f0  ca be 00 15
panic: pool panic
8.out 703: suicide: sys: trap: fault read addr=0x0 pc=0x000065fb
apple%

Any ideas? More info provided on request.

Don (north_)


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

end of thread, other threads:[~2004-02-22  1:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-20  1:07 [9fans] Do the Pool Voodoo like I do David Presotto
2004-02-22  1:09 ` Russ Cox
2004-02-22  1:17   ` dbailey27
  -- strict thread matches above, loose matches on Subject: below --
2004-02-20  0:52 dbailey27
2004-02-20  1:07 ` Geoff Collyer

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