# Re: How Do I Debug This?

**URL:** <https://www.ruby-forum.com/t/re-how-do-i-debug-this/181132>\
**Category:** Ruby\
**Created:** [January 6, 2010, 2:20am UTC](https://www.ruby-forum.com/t/re-how-do-i-debug-this/181132 "2010-01-06T02:20:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Choi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e9bcb4/32.png) [@Andrew\_Choi](https://www.ruby-forum.com/u/Andrew_Choi)\
**Post date:** [January 6, 2010, 2:20am UTC](https://www.ruby-forum.com/t/re-how-do-i-debug-this/181132/1 "2010-01-06T02:20:29Z")

</div>

p {margin-top:0px;margin-bottom:0px;}

| 
unsubscribe - Andrew Choi(removed\_email\_address@domain.invalid)  
  
  
  
  

> ---------[¹ÞÀº ¸ÞÀÏ ³»¿ë]----------  
> **Á¦¸ñ :** Re: How Do I Debug This?  
> **³¯Â¥ :** 2010³â 1¿ù 06ÀÏ ¼ö¿äÀÏ, ¿ÀÀü 08½Ã 21ºÐ 37ÃÊ +0900  
> **º¸³½ÀÌ :** Jeremy H. \<removed\_email\_address@domain.invalid\>  
> **¹Þ´ÂÀÌ :** removed\_email\_address@domain.invalid (ruby-talk ML)  
>   
> On Wed, Jan 06, 2010 at 07:59:34AM +0900, James Edward G. II wrote:  
> \> I'm getting an error in a test suite for an FFI project:  
> \>   
> \> ............................................................................................................................................ruby(1756) malloc: \*\*\* error for object 0x101c39310: pointer being freed was not allocated  
> \> \*\*\* set a breakpoint in malloc\_error\_break to debug  
> \>   
> \> I assume I'm forgetting to free an allocated chunk of memory. What's te best way to zero in on the issue?  
> \>   
> \> Is the breakpoint suggestion a gdb tip? Is there anywhere I could go read about how to look into that?  
> \>   
> \> Thanks in advance for the advice.  
> \>   
> \> James Edward G. II  
>   
> When I have something like this, I generally will compile a debug (-g)  
> version of ruby and then run the spec/test via gdb to figure it out. Do a stack  
> trace in gdb and look where the free is being called and go from there.   
>   
> I'm guessing that this might be showing up in your new OklahomaMixer project  
> and that this free might be happening in relation to a Tokyo Cabinet call :-).  
>   
> If that is the case, I'd also compile a debug version of TC for you to use  
> with FFI, and you might need a debug version of FFI also.  
>   
> enjoy,  
>   
> -jeremy  
>   
> --   
> ========================================================================  
> Jeremy H. [removed\_email\_address@domain.invalid](https://www.ruby-forum.com/hanmail/mail/MailComposeFrame.daum?TO=removed_email_address@domain.invalid)

 |

```
    <br><br><a href="mailto:removed_email_address@domain.invalid"><img 

```

src=“[http://nametag.hanmail.net/3K3As7mKsYbV3qUGklp-lg00](http://nametag.hanmail.net/3K3As7mKsYbV3qUGklp-lg00)”  
border=“0”\>

| 

[![](http://mailimg.hanmail.net/09mail/banner/100105_chicago.gif)](http://allim.daum.net/servlet/Redirect?sid=culture_100105_chicago)

 | [![](http://amsimg.daum-img.net/www2/0Dfh/cPJA/bn_footer_movie__1202.gif)](http://allim.daum.net/servlet/Redirect?sid=footer_091203_movie)  
 |

[![¹Ì¾ÆÃ£±â Ä·ÆäÀÎ](http://mimg.daum-img.net/missingchild/mail_banner_091211.jpg)](http://allim.daum.net/servlet/Redirect?sid=mail_banner_091211)  
 ![](http://wwl1083.hanmail.net:4280/@from=achoi&rcpt=ruby%2Dtalk%40ruby%2Dlang%2Eorg&msgid=%3C20100106101731%2EHM%2Ez000000000JAJJE%40achoi%2Ewwl1083%2Ehanmail%2Enet%3E)
