php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41425 php(995) malloc: *** vm_allocate(size=262144) failed (error code=-301)
Submitted: 2007-05-18 04:19 UTC Modified: 2007-05-26 01:00 UTC
Votes:6
Avg. Score:4.0 ± 1.0
Reproduced:5 of 5 (100.0%)
Same Version:1 (20.0%)
Same OS:2 (40.0%)
From: niedbalski at gmail dot com Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 5.2.2 OS: MAC OS X 10.4.8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: niedbalski at gmail dot com
New email:
PHP Version: OS:

 

 [2007-05-18 04:19 UTC] niedbalski at gmail dot com
Description:
------------
__CLASS__ initialize_conn : Error querying DB

_CLASS_ Error : 
php(995) malloc: *** vm_allocate(size=262144) failed (error code=-301)
php(995) malloc: *** error: can't allocate region
php(995) malloc: *** set a breakpoint in szone_error to debug

Fatal error: Out of memory (allocated 262144) (tried to allocate 16384 bytes) in /Users/aktive/public_html/otros/httpclass/httpgetid.php on line 44


Disas of vm_allocate :

0x90017c08 <vm_allocate+0>:     mflr    r0
0x90017c0c <vm_allocate+4>:     bcl-    20,4*cr7+so,0x90017c10<vm_allocate+8>
0x90017c10 <vm_allocate+8>:     stmw    r28,-16(r1)
0x90017c14 <vm_allocate+12>:    mr      r28,r4
0x90017c18 <vm_allocate+16>:    mflr    r31
0x90017c1c <vm_allocate+20>:    stw     r0,8(r1)
0x90017c20 <vm_allocate+24>:    stwu    r1,-128(r1)
0x90017c24 <vm_allocate+28>:    addis   r2,r31,4095
0x90017c28 <vm_allocate+32>:    lwz     r9,0(r4)
0x90017c2c <vm_allocate+36>:    lwz     r29,-7856(r2)
0x90017c30 <vm_allocate+40>:    stw     r5,92(r1)
0x90017c34 <vm_allocate+44>:    lwz     r0,0(r29)
0x90017c38 <vm_allocate+48>:    lwz     r2,4(r29)
0x90017c3c <vm_allocate+52>:    stw     r0,80(r1)
0x90017c40 <vm_allocate+56>:    li      r0,5395
0x90017c44 <vm_allocate+60>:    stw     r6,96(r1)
0x90017c48 <vm_allocate+64>:    stw     r2,84(r1)
0x90017c4c <vm_allocate+68>:    stw     r9,88(r1)
0x90017c50 <vm_allocate+72>:    stw     r0,56(r1)
0x90017c54 <vm_allocate+76>:    stw     r3,64(r1)
0x90017c58 <vm_allocate+80>:    bl      0x9019a0a0 <dyld_stub_mig_get_reply_port>
0x90017c5c <vm_allocate+84>:    mr      r2,r3
0x90017c60 <vm_allocate+88>:    mr      r7,r3
0x90017c64 <vm_allocate+92>:    li      r0,3801
0x90017c68 <vm_allocate+96>:    addi    r3,r1,56
0x90017c6c <vm_allocate+100>:   li      r4,3
0x90017c70 <vm_allocate+104>:   li      r5,44
0x90017c74 <vm_allocate+108>:   li      r6,48
0x90017c78 <vm_allocate+112>:   li      r8,0
0x90017c7c <vm_allocate+116>:   li      r9,0
0x90017c80 <vm_allocate+120>:   stw     r0,76(r1)
0x90017c84 <vm_allocate+124>:   stw     r2,68(r1)
0x90017c88 <vm_allocate+128>:   bl      0x9019a040 <dyld_stub_mach_msg>
0x90017c8c <vm_allocate+132>:   mr.     r30,r3
0x90017c90 <vm_allocate+136>:   beq-    0x90017cec <vm_allocate+228>
0x90017c94 <vm_allocate+140>:   lis     r0,4096
0x90017c98 <vm_allocate+144>:   ori     r0,r0,16386
0x90017c9c <vm_allocate+148>:   cmpw    cr7,r30,r0
0x90017ca0 <vm_allocate+152>:   beq-    cr7,0x90017ce0 <vm_allocate+216>
0x90017ca4 <vm_allocate+156>:   bgt-    cr7,0x90017cc4 <vm_allocate+188>
0x90017ca8 <vm_allocate+160>:   lis     r0,4096
0x90017cac <vm_allocate+164>:   ori     r0,r0,9
0x90017cb0 <vm_allocate+168>:   cmpw    cr7,r30,r0
0x90017cb4 <vm_allocate+172>:   beq-    cr7,0x90017ce0 <vm_allocate+216>
0x90017cb8 <vm_allocate+176>:   lwz     r3,68(r1)
0x90017cbc <vm_allocate+180>:   bl      0x9019a0c0 <dyld_stub_mig_put_reply_port>
0x90017cc0 <vm_allocate+184>:   b       0x90017d78 <vm_allocate+368>
0x90017cc4 <vm_allocate+188>:   lis     r0,4096
0x90017cc8 <vm_allocate+192>:   ori     r0,r0,16390
0x90017ccc <vm_allocate+196>:   cmpw    cr7,r30,r0
0x90017cd0 <vm_allocate+200>:   beq-    cr7,0x90017ce0 <vm_allocate+216>
0x90017cd4 <vm_allocate+204>:   lis     r0,4096
0x90017cd8 <vm_allocate+208>:   ori     r0,r0,16393
0x90017cdc <vm_allocate+212>:   b       0x90017cb0 <vm_allocate+168>
0x90017ce0 <vm_allocate+216>:   lwz     r3,68(r1)
0x90017ce4 <vm_allocate+220>:   bl      0x9019a0e0 <dyld_stub_mig_dealloc_reply_port>
0x90017ce8 <vm_allocate+224>:   b       0x90017d78 <vm_allocate+368>
0x90017cec <vm_allocate+228>:   lwz     r0,76(r1)
0x90017cf0 <vm_allocate+232>:   cmpwi   cr7,r0,3901
0x90017cf4 <vm_allocate+236>:   beq+    cr7,0x90017d0c <vm_allocate+260>
0x90017cf8 <vm_allocate+240>:   cmpwi   cr7,r0,71
0x90017cfc <vm_allocate+244>:   li      r30,-308
0x90017d00 <vm_allocate+248>:   beq-    cr7,0x90017d78 <vm_allocate+368>
0x90017d04 <vm_allocate+252>:   li      r30,-301
0x90017d08 <vm_allocate+256>:   b       0x90017d78 <vm_allocate+368>
0x90017d0c <vm_allocate+260>:   lwz     r9,88(r1)
0x90017d10 <vm_allocate+264>:   cmpwi   cr7,r9,0
0x90017d14 <vm_allocate+268>:   beq-    cr7,0x90017d44 <vm_allocate+316>
0x90017d18 <vm_allocate+272>:   lbz     r2,4(r29)
0x90017d1c <vm_allocate+276>:   lbz     r0,84(r1)
0x90017d20 <vm_allocate+280>:   cmpw    cr7,r0,r2
0x90017d24 <vm_allocate+284>:   beq-    cr7,0x90017d34 <vm_allocate+300>
0x90017d28 <vm_allocate+288>:   addi    r2,r1,88
0x90017d2c <vm_allocate+292>:   lwbrx   r9,r2,r30
0x90017d30 <vm_allocate+296>:   stw     r9,88(r1)
0x90017d34 <vm_allocate+300>:   cmpwi   cr7,r9,0
0x90017d38 <vm_allocate+304>:   mr      r30,r9
0x90017d3c <vm_allocate+308>:   beq+    cr7,0x90017d6c <vm_allocate+356>
0x90017d40 <vm_allocate+312>:   b       0x90017d78 <vm_allocate+368>
0x90017d44 <vm_allocate+316>:   lbz     r2,4(r29)
0x90017d48 <vm_allocate+320>:   lbz     r0,84(r1)
0x90017d4c <vm_allocate+324>:   cmpw    cr7,r0,r2
0x90017d50 <vm_allocate+328>:   beq-    cr7,0x90017d6c <vm_allocate+356>
0x90017d54 <vm_allocate+332>:   addi    r2,r1,88
0x90017d58 <vm_allocate+336>:   lwbrx   r2,r2,r30
0x90017d5c <vm_allocate+340>:   stw     r2,88(r1)
0x90017d60 <vm_allocate+344>:   addi    r9,r1,92
0x90017d64 <vm_allocate+348>:   lwbrx   r9,r9,r30
0x90017d68 <vm_allocate+352>:   stw     r9,92(r1)
0x90017d6c <vm_allocate+356>:   lwz     r0,92(r1)
0x90017d70 <vm_allocate+360>:   li      r30,0
0x90017d74 <vm_allocate+364>:   stw     r0,0(r28)
0x90017d78 <vm_allocate+368>:   addi    r1,r1,128
0x90017d7c <vm_allocate+372>:   mr      r3,r30
0x90017d80 <vm_allocate+376>:   lwz     r0,8(r1)
0x90017d84 <vm_allocate+380>:   lmw     r28,-16(r1)
0x90017d88 <vm_allocate+384>:   mtlr    r0
0x90017d8c <vm_allocate+388>:   blr
0x90017d90 <vm_allocate+392>:   .long 0x0
0x90017d94 <vm_allocate+396>:   .long 0x0
0x90017d98 <vm_allocate+400>:   .long 0x0
0x90017d9c <vm_allocate+404>:   .long 0x0
0x90017da0 <vm_allocate+408>:   .long 0x0
End of assembler dump.
(gdb) 


Reproduce code:
---------------
    if(!http_get($this->url, array("timeout"=>10), $response[1])) {
                                        throw new Exception("Error in http_get headers\n");
                                }


Expected result:
----------------
OK 

Actual result:
--------------
__CLASS__ initialize_conn : Error querying DB

_CLASS_ Error : 
php(995) malloc: *** vm_allocate(size=262144) failed (error code=-301)
php(995) malloc: *** error: can't allocate region
php(995) malloc: *** set a breakpoint in szone_error to debug

Fatal error: Out of memory (allocated 262144) (tried to allocate 16384 bytes) in /Users/aktive/public_html/otros/httpclass/httpgetid.php on line 44


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-18 11:17 UTC] sniper@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2007-05-26 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Sep 20 20:00:02 2025 UTC