Out of memory error in v2.3 compile_to_c.

Phil Malin <[email protected]> Sun, 09 Sep 2007 09:25:43 +1000
Newsgroups gmane.comp.lang.eiffel.smalleiffel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------000200040504030409060408
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi all.

Recently I tried to compile a small project I'm writing using the v2.3 
compiler and had the compiler (compile_to_c) crash on me.  I recompiled 
it with assertions turned on and (after 8 hours of compiling later :-) ) 
found that the compiler threw an "out of memory" error.

Following is a small snippet of the stack trace.  If no one here has 
come across this I'll save the entire stack dump (it was longer than my 
term's buffer size) and submit a bug report.  I did a quick search on 
smartzilla but didn't come across anything.

    twin FAST_ARRAY[STRING_RECYCLING_ITEM]
    Current = FAST_ARRAY[STRING_RECYCLING_ITEM]#0x8c62018
            [ storage = NATIVE_ARRAY[STRING_RECYCLING_ITEM]#0x9965490
              capacity = 256
              upper = 179
            ]
    Result = FAST_ARRAY[STRING_RECYCLING_ITEM]#0x28a6d9b8
            [ storage = NATIVE_ARRAY[STRING_RECYCLING_ITEM]#0x0
              capacity = 0
              upper = 0
            ]
    line 79 column 9 file
    /usr/home/psm/lib/SmartEiffel-daily-snapshot/tags/v2-3_stable/lib/kernel/any.e

    ======================================
    copy FAST_ARRAY[STRING_RECYCLING_ITEM]
    Current = FAST_ARRAY[STRING_RECYCLING_ITEM]#0x28a6d9b8
            [ storage = NATIVE_ARRAY[STRING_RECYCLING_ITEM]#0x0
              capacity = 0
              upper = 0
            ]
    other = FAST_ARRAY[STRING_RECYCLING_ITEM]#0x8c62018
            [ storage = NATIVE_ARRAY[STRING_RECYCLING_ITEM]#0x9965490
              capacity = 256
              upper = 179
            ]
    other_upper = 179
    new_capacity = 180
    line 178 column 6 file
    /usr/home/psm/lib/SmartEiffel-daily-snapshot/tags/v2-3_stable/lib/storage/collection/fast_array.e

    =====   Top of run-time stack    =====
    *** Error at Run Time ***: No more memory.
    Error occurs while compiling. Compilation process aborted.


I'm just trying to remember what I did to my project to trigger this 
problem because it was compiling fine but after I did a non-trivial 
refactoring this problem reared its head.  When I say it's a small 
project I'd estimate I'm using about 30 odd classes that I've written 
myself.

Also, I'm running this on FreeBSD 6.2 with 2GB of RAM and have compiled 
projects much larger than this (well, the SmartEiffel compiler suite for 
a start ;-) ).

Cheers.

Phil.

--------------000200040504030409060408
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<div align="justify"><font face="Bookman Old Style">Hi all.</font><br>
<br>
<font face="Bookman Old Style">Recently I tried to compile a small
project I'm writing using the v2.3 compiler and had the compiler
(compile_to_c) crash on me.&nbsp; I recompiled it with assertions turned on
and (after 8 hours of compiling later :-) ) found that the compiler
threw an "out of memory" error.</font><br>
<br>
<font face="Bookman Old Style">Following is a small snippet of the
stack trace.&nbsp; If no one here has come across this I'll save the entire
stack dump (it was longer than my term's buffer size) and submit a bug
report.&nbsp; I did a quick search on smartzilla but didn't come across
anything.</font><br>
</div>
<tt><br>
</tt>
<blockquote><tt>twin FAST_ARRAY[STRING_RECYCLING_ITEM]</tt><br>
  <tt>Current = FAST_ARRAY[STRING_RECYCLING_ITEM]#0x8c62018</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ storage = NATIVE_ARRAY[STRING_RECYCLING_ITEM]#0x9965490</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; capacity = 256</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; upper = 179</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]</tt><br>
  <tt>Result = FAST_ARRAY[STRING_RECYCLING_ITEM]#0x28a6d9b8</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ storage = NATIVE_ARRAY[STRING_RECYCLING_ITEM]#0x0</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; capacity = 0</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; upper = 0</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]</tt><br>
  <tt>line 79 column 9 file
/usr/home/psm/lib/SmartEiffel-daily-snapshot/tags/v2-3_stable/lib/kernel/any.e
  </tt><br>
  <tt>======================================</tt><br>
  <tt>copy FAST_ARRAY[STRING_RECYCLING_ITEM]</tt><br>
  <tt>Current = FAST_ARRAY[STRING_RECYCLING_ITEM]#0x28a6d9b8</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ storage = NATIVE_ARRAY[STRING_RECYCLING_ITEM]#0x0</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; capacity = 0</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; upper = 0</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]</tt><br>
  <tt>other = FAST_ARRAY[STRING_RECYCLING_ITEM]#0x8c62018</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ storage = NATIVE_ARRAY[STRING_RECYCLING_ITEM]#0x9965490</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; capacity = 256</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; upper = 179</tt><br>
  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]</tt><br>
  <tt>other_upper = 179</tt><br>
  <tt>new_capacity = 180</tt><br>
  <tt>line 178 column 6 file
/usr/home/psm/lib/SmartEiffel-daily-snapshot/tags/v2-3_stable/lib/storage/collection/fast_array.e
  </tt><br>
  <tt>=====&nbsp;&nbsp; Top of run-time stack&nbsp;&nbsp;&nbsp; =====</tt><br>
  <tt>*** Error at Run Time ***: No more memory.</tt><br>
  <tt>Error occurs while compiling. Compilation process aborted.</tt><br>
</blockquote>
<font face="Bookman Old Style"><br>
</font>
<div align="justify"><font face="Bookman Old Style">I'm just trying to
remember what I did to my project to trigger this problem because it
was compiling fine but after I did a non-trivial refactoring this
problem reared its head.&nbsp; When I say it's a small project I'd estimate
I'm using about 30 odd classes that I've written myself.<br>
<br>
Also, I'm running this on FreeBSD 6.2 with 2GB of RAM and have compiled
projects much larger than this (well, the SmartEiffel compiler suite
for a start ;-) ).<br>
</font></div>
<font face="Bookman Old Style"><br>
Cheers.<br>
<br>
Phil.<br>
</font>
</body>
</html>

--------------000200040504030409060408--