From: Rudolf Polzer Date: 2003-04-03T03:32:13+09:00 Subject: Re: SIGSEGV and crash in $std***.print Scripsit ille aut illa �nobu.nokada@softhome.net� : > At Wed, 2 Apr 2003 00:46:58 +0900, > Rudolf Polzer wrote: > > The following program creates a segfault or interpreter crash extremly > > fast - but seemingly only on my computer: > > > > rpolzer@katsuragi ruby $ ruby putpixel.rb 1>/dev/null > > putpixel.rb:17: [BUG] Segmentation fault > > ruby 1.6.8 (2002-12-24) [i686-linux-gnu] > > Aborted > > rpolzer@katsuragi ruby $ ruby putpixel.rb 1>/dev/null > > putpixel.rb:22:in `write': method call on terminated object (NotImplementedError) > > It seems GC bug, although I couldn't reproduce the issue with GC == Garbage Collector or do you mean GCC? And yes, putting "GC.disable" at the beginning 'fixes' the problem, but it's eating up memory really fast (and I have no idea where in the program a lot of memory is allocated - does "some_string" already create an object, which is to be garbage collected soon? How to avoid those memory allocations? Commenting out all lines with " didn't reduce memory usage...). > latest 1.6.8 (2003-03-26), but am not sure it's a fixed bug. > > What's your GCC's version and CFLAGS which you configured? Current: gcc (GCC) 3.2.2 20030322 (Gentoo Linux 1.4 3.2.2-r2) I don't have the old gcc I used to compile Ruby any more (it was a "plain" gcc 3.2.2). However, I know it was compiled with -O3 -march=pentium -mcpu=athlon-tbird Just compiled Ruby with -O0. Works, no crash in the program. Now compiling with my "current" CFLAGS: -Os -march=pentium2 -mcpu=athlon-tbird Result: again no problem. Seems like it was the gcc. Thanks! -- i hope that anal monkeys will burrow up your anal cavity through your intestines, your colon, and steal your kidneys and come out of your ears, which will be a piece of cake for them because there'd only be an amoeba sized brain blocking the exit. [MBVA in japan.anime.evangelion]