Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14416 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40625 invoked by uid 1010); 21 Jan 2005 14:45:29 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 40610 invoked from network); 21 Jan 2005 14:45:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jan 2005 14:45:28 -0000 X-Host-Fingerprint: 206.190.36.199 web53804.mail.yahoo.com Received: from ([206.190.36.199:38029] helo=web53804.mail.yahoo.com) by pb1.pair.com (ecelerity HEAD (r4105:4106)) with SMTP id 8B/D5-15286-88511F14 for ; Fri, 21 Jan 2005 09:45:28 -0500 Received: (qmail 49970 invoked by uid 60001); 21 Jan 2005 14:45:26 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=k/XLhD0UZG1xZGIhJO+vN8ufa0minBE8LWLqovUVCf4//JwVx4+a5TqX1qDkwUlrKSoRVBXnDPTQTI3pvRSiOBayhynLXvSsZDOuiuwxKd3Cee10Ps4g+SgQQvJCAG0IaKlzFo1ICBeBska/BOjO6N+biTaQLYQNwoiV2M+Tk9s= ; Message-ID: <20050121144526.49968.qmail@web53804.mail.yahoo.com> Received: from [66.240.11.2] by web53804.mail.yahoo.com via HTTP; Fri, 21 Jan 2005 06:45:26 PST Date: Fri, 21 Jan 2005 06:45:26 -0800 (PST) To: internals@lists.php.net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1323392535-1106318726=:48514" Subject: address out of bounds error: PHP5 From: shruti224@yahoo.com (shruti) --0-1323392535-1106318726=:48514 Content-Type: text/plain; charset=us-ascii Hi .. I needed some help with the following loop. All I am doing here is dividing the record set into some fixed size chunks(25000 here) and then copyin the 25000 records from the whole records-set($hvulnrecords(SIZE: APPROX 200000 RECS..which is an associative array) into another array $parts. After that I insert 25000 records using some Sqlite (INSERT statements).... Output halts after ... No. of hostvuln chunks7 Count of vuln recs:25000 Code:: --------------------- $chunkcnt = intval(count($hvulnrecords)/25000); echo "\nNo. of hostvuln chunks" . $chunkcnt; if($chunkcnt>0) { $begin = 0; $end = 0; for($k = 0; $k < $chunkcnt; $k++) { $end += 25000; $i = 0; $parts = array(); for($j = $begin;$j < $end; $j++) { $parts[$i] = $hvulnrecords[$j]; $i++; } if($this->_hostvuln->insertTransaction($parts))//add it {} else { echo "\nFailed insert for hostvuln: Chunk no-" . $k; } $begin = $j; } //copy remaining $i = 0; $parts = array(); for($j = $end;$j_hostvuln->insertTransaction($parts))//add it {} else { echo "\nFailed insert for hostvuln: remaining."; } } else { if($this->_hostvuln->insertTransaction($hvulnrecords))//add it {} else { echo "\nFailed insert for hostvuln."; } } . . . function insertTransaction($records) { echo "\nCount of vuln recs:" . count($records); $sql = 'BEGIN;'; foreach ($records as $num => $record) { .//assign stmts and call Insertquery db->query($sql); //check for lastError..if none commit or rollback } } ps shows...program is sleeping And ..gdb shows it errored out...pasting the gdb output..below No symbol table info available. #12 0x08129561 in php_error_cb (type=7901952, error_filename=0x400
, error_lineno=679586864, format=0xbfe9a83c "\036", args=0x4000000
) at /home/shruti/php-5.0.2/main/main.c:645 buffer = 0x4e
buffer_len = 33 display = 0 Previous frame identical to this frame (corrupt stack?) Could someone please help me? Will wait for a reply... Thanks a lot! Regards, Shruti. --------------------------------- Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. --0-1323392535-1106318726=:48514--