Skip to main content

Romizer crashing on optimzation

3 replies [Last post]
chukmunnlee
Offline
Joined: 2004-01-14
Points: 0

Hi all,

I'm having some funny behaviour when the romizer runs during a CLDC build. The only set flag that I've set is ENABLE_ISOLATES (to true). Anyway I compiled this on OpenSuse 10.3 with GCC 4.2.1 without any problems. The romize stage is also successful.

My current system is OpenSuse 11 with GCC 4.3.1. In the romizer stage, the process crash

../../romgen/app/romgen -cp /home/homebrew/src/pmef/build_output/classes.zip +GenerateGNUCode =HeapCapacity32M -romconfig /home/homebrew/src/pmef/cldc/src/vm/cldctest_rom.cfg -romincludepath /home/homebrew/src/pmef/cldc/src/vm +RewriteROMConstantPool +EnableAllROMOptimizations -romize

If romizer fails, increase your heap size.
E.g., =HeapCapacity80M

Starting free heap = 26144 KB
Loading classes...Done! in 0.20 seconds
... reading system property: microedition.encoding
Fatal signal SIGILL: errno=0; code=2; addr=0x81b21bb
[Dumping all threads]
Current thread = 0x40001000

[Thread: 0x40001000 *** CURRENT ***]
task ID 0x1
Stack Trace (id=0) [make[1]: *** [../generated/ROMImage.cpp] Segmentation fault
make[1]: Leaving directory `/home/homebrew/src/pmef/build_output/linux_i386/target/debug'
make: *** [_debug] Error 2

So after some searching I found that the call ObjectHeap::iterate(this) in ROMOptimizer::iterate() is passing an invalid Oop object to ROMOptimizer::do_obj(Oop* obj).

Not sure if this is a bug. If this is not a bug, then is there some other flags that I need to be setting? Any tips appreciated.

Thanks

Regards
Chuk

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
danila
Offline
Joined: 2006-09-25
Points: 0

Hi Chuk,
it might be useful to build romgen in debug mode.
Try a clean rebuild with USE_DEBUG_ROMGEN=true and USE_DEBUG_ROMGEN_SYMBOLS=true.
This way you can get some diagnostics before the crash.

Danila

chukmunnlee
Offline
Joined: 2004-01-14
Points: 0

Danila,

thanks for the tip. I actually successfully run romizer by setting the two flags that you suggested. Note you have to set BOTH the flags. If you just set USE_DEBUG_ROMGEN I will still see the problem. Looks like this might be a compiler problem here.

Regards
Chuk

chukmunnlee
Offline
Joined: 2004-01-14
Points: 0

Just a followup. I'm building cldc/build/linux_i386

Regards
Chuk