opensubscriber
   Find in this group all groups
 
Unknown more information…

d : darwinos-users@lists.apple.com 6 November 2005 • 9:03PM -0500

Crash on szone_malloc
by Marco Bambini

REPLY TO AUTHOR
 
REPLY TO GROUP




I am developing a PHP extension for OSX but it crashes often in a  
very simple routine that performs a single malloc of about 150bytes,  
something like:

char *SQLabsDBInit (void)
{
myPtr = malloc (sizeof(myStruct));
if (myPtr == NULL) return NULL:
...
return myPtr;
}

the crash log reports a EXC_BAD_ACCESS (KERN_PROTECTION_FAILURE) in  
the szone_malloc routine.
Any idea of a possible cause of the crash?

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x0000000e

Thread 0 Crashed:
0   libSystem.B.dylib 0x90004774 szone_malloc + 4048
1   libSystem.B.dylib 0x9000345c malloc + 652
2   rsql.dylib         0x000e7c84 SQLabsDBInit + 32 (rsqlsdk.c:737)
3   rsql.dylib         0x000e9574 rsqlserver_connect + 1976  
(rsqlsdk.c:52)
4   rsql.dylib         0x000e0e88 rsql_realconnect + 1360 (rsql.c:267)
5   libphp4.so         0x00535c58 execute + 8612
6   libphp4.so         0x0052616c zend_execute_scripts + 204
7   libphp4.so         0x004fbf20 php_execute_script + 604
8   libphp4.so         0x00539740 apache_php_module_main + 184
9   libphp4.so         0x0053a414 send_php + 672
10  httpd             0x0000dd18 ap_invoke_handler + 232
11  httpd             0x00017dd4 process_request_internal + 640
12  httpd             0x00017e54 ap_process_request + 72
13  httpd             0x00006b60 child_main + 1832
14  httpd             0x00006dc4 make_child + 312
15  httpd             0x000070f4 perform_idle_server_maintenance + 572
16  httpd             0x000076d0 standalone_main + 964
17  httpd             0x00007d74 main + 1052
18  httpd             0x0000238c _start + 348
19  httpd             0x0000222c start + 60

Thread 0 crashed with PPC Thread State 64:
   srr0: 0x0000000090004774 srr1:  
0x100000000000d030                        vrsave: 0x0000000000000000
     cr: 0x44002404          xer: 0x0000000020000000   lr:  
0x00000000900037b0  ctr: 0x00000000900037a4
     r0: 0x000000000180016c   r1: 0x00000000bfffd3c0   r2:  
0x00000000018000f0   r3: 0x000000000182fa00
     r4: 0x0000000000000604   r5: 0x000000000034c290   r6:  
0x000000000034c2d0   r7: 0x000000000000000c
     r8: 0x0000000000000000   r9: 0x0000000000000006  r10:  
0x00000000006cdd20  r11: 0x0000000001800100
    r12: 0x00000000900037a4  r13: 0x0000000000000000  r14:  
0x0000000000000000  r15: 0x0000000000000000
    r16: 0x0000000000000000  r17: 0x0000000000000000  r18:  
0x0000000000000000  r19: 0x000000000034c2d0
    r20: 0x0000000000000000  r21: 0x0000000000000604  r22:  
0x0000000000000000  r23: 0x00000000bfffd948
    r24: 0x000000000034c0e0  r25: 0x0000000000000004  r26:  
0x000000000182fa00  r27: 0x0000000001800000
    r28: 0x0000000001800000  r29: 0x0000000000000000  r30:  
0x0000000000000000  r31: 0x00000000900037b0

Thanks a lot for your help.

---
Marco Bambini
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwinos-users mailing list      (Darwinos-users@list...)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwinos-users/subscriber%40opensubscriber.com

This email sent to subscriber@open...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

opensubscriber is not affiliated with the authors of this message nor responsible for its content.