# Memory leak in 1.8.6-p287

**URL:** <https://www.ruby-forum.com/t/memory-leak-in-1-8-6-p287/146746>\
**Category:** Ruby\
**Created:** [August 25, 2008, 3:21am UTC](https://www.ruby-forum.com/t/memory-leak-in-1-8-6-p287/146746 "2008-08-25T03:21:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mperham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@mperham](https://www.ruby-forum.com/u/mperham)\
**Post date:** [August 25, 2008, 3:21am UTC](https://www.ruby-forum.com/t/memory-leak-in-1-8-6-p287/146746/1 "2008-08-25T03:21:40Z")

</div>

We’ve noticed a pretty severe memory leak since upgrading from p114 to  
p287. I ran valgrind on my test suite and got this error:

==24626== 352 (48 direct, 304 indirect) bytes in 2 blocks are definitely  
lost in loss record 13 of 56  
==24626== at 0x4A19DDB: malloc (vg\_replace\_malloc.c:207)  
==24626== by 0x42CFE3: ruby\_xmalloc (gc.c:110)  
==24626== by 0x47062B: st\_init\_table\_with\_size (st.c:159)  
==24626== by 0x48BCC8: rb\_class\_boot (class.c:31)  
==24626== by 0x418649: rb\_call0 (eval.c:5870)  
==24626== by 0x419298: rb\_call (eval.c:6117)  
==24626== by 0x419DC6: vafuncall (eval.c:6194)  
==24626== by 0x41A032: rb\_funcall (eval.c:6211)  
==24626== by 0x44198E: rb\_obj\_alloc (object.c:1534)  
==24626== by 0x442BAC: rb\_obj\_dup (object.c:260)  
==24626== by 0x418649: rb\_call0 (eval.c:5870)  
==24626== by 0x419298: rb\_call (eval.c:6117)  
==24626== by 0x41504D: rb\_eval (eval.c:3490)  
==24626== by 0x416F45: rb\_eval (eval.c:3700)  
==24626== by 0x414F57: rb\_eval (eval.c:3484)

Sorry I can’t decipher the output very well. Can anyone else figure out  
the stack and what this means? I would be happy to get more detail,  
just let me know what you need.

mike

---

<div class="post-metadata">

**Author:** ![mperham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@mperham](https://www.ruby-forum.com/u/mperham)\
**Post date:** [August 25, 2008, 4:29pm UTC](https://www.ruby-forum.com/t/memory-leak-in-1-8-6-p287/146746/2 "2008-08-25T16:29:25Z")

</div>

Do you have any test code to re-create it?

Mike P. wrote:

> We’ve noticed a pretty severe memory leak since upgrading from p114 to  
> p287. I ran valgrind on my test suite and got this error:
> 
> ==24626== 352 (48 direct, 304 indirect) bytes in 2 blocks are definitely  
> lost in loss record 13 of 56  
> ==24626== at 0x4A19DDB: malloc (vg\_replace\_malloc.c:207)  
> ==24626== by 0x42CFE3: ruby\_xmalloc (gc.c:110)  
> ==24626== by 0x47062B: st\_init\_table\_with\_size (st.c:159)
