From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <18daad73cb88cb5f853285318a06c7f6@plan9.bell-labs.com> From: David Presotto To: dbailey27@ameritech.net, 9fans@cse.psu.edu Subject: Re: [9fans] Do the Pool Voodoo like I do MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-mvwdvesfgcehndkumxaiuvyris" Date: Thu, 19 Feb 2004 20:07:42 -0500 Topicbox-Message-UUID: ef81fdf2-eacc-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-mvwdvesfgcehndkumxaiuvyris Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit 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. --upas-mvwdvesfgcehndkumxaiuvyris Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Thu Feb 19 19:59:53 EST 2004 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Thu Feb 19 19:59:50 EST 2004 Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id F129019CDA; Thu, 19 Feb 2004 19:59:36 -0500 (EST) Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.4.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 39B6E19BDE; Thu, 19 Feb 2004 19:59:31 -0500 (EST) X-Original-To: 9fans@cse.psu.edu Delivered-To: 9fans@cse.psu.edu Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id 8DB8E19A20; Thu, 19 Feb 2004 19:58:23 -0500 (EST) Received: from pimout6-ext.prodigy.net (pimout6-ext.prodigy.net [207.115.63.78]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 3A56519B69 for <9fans@cse.psu.edu>; Thu, 19 Feb 2004 19:58:19 -0500 (EST) Received: from apple.autumn.net.sc (adsl-68-21-43-189.dsl.sfldmi.ameritech.net [68.21.43.189]) by pimout6-ext.prodigy.net (8.12.10/8.12.10) with ESMTP id i1K0wITq027088 for <9fans@cse.psu.edu>; Thu, 19 Feb 2004 19:58:18 -0500 Message-ID: <8a1ec9efc59551c37ee2638fb0d006c1@yourdomain.dom> From: dbailey27@ameritech.net To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] Do the Pool Voodoo like I do Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 19 Feb 2004 19:52:58 -0500 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on psuvax1.cse.psu.edu X-Spam-Status: No, hits=1.3 required=5.0 tests=FROM_ENDS_IN_NUMS,NO_REAL_NAME, RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Level: * 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_) --upas-mvwdvesfgcehndkumxaiuvyris--