Tuesday, October 11, 2005

When malloc gave a core dump

Just now i fixed a core dump caused by a call to malloc. I was wondering y malloc wud give a core dump. With the help of google and purify, i found that an Array Bounds Write that occured well before the call to malloc, resulted in the Segmentation Fault. ABW must have corrupted Malloc's allocation table and that resulted in chaos malloc.

2 Comments:

Blogger Karthik Gurusamy said...

I was searching for a friend of mine.. Balaji Srinivasan and happened to stumble across yours.

typically malloc like libraries allocate a small header per allocated objects where they keep track of some stuff (say next/previous pointers). So a misbehaving code could leave mallocs internal datastructures corrupted. On another malloc/free call, we see error

2:46 PM  
Blogger Balaji said...

yeah.. thats wat happened in my case...

12:51 AM  

Post a Comment

<< Home