[ooc-compiler] oo2c-2.0.18 allocator problem
Brought to you by:
mva
|
From: Frank C. <fj...@wo...> - 2004-02-10 13:16:21
|
I'm building VO_031223 with oo2c_32-2.0.18 on a Debian testing box. With an empty ~/VisualOberon, VisualPrefs crashes with the following output: ## ## Runtime error in module Object at pos 11466 ## Array index out of range, 100 not in 0 <= x < 100 ## 0: /usr/local/lib/liboo2c.so.0 [0x4038302b] 1: /usr/local/lib/liboo2c.so.0(_runtime_error+0x4a) [0x403830da] 2: /usr/local/lib/liboo2c.so.0 [0x40383646] 3: /usr/local/lib/liboo2c.so.0(Object__NewLatin1+0x6a) [0x4038455a] 4: /usr/local/lib/liboo2c_vo.so.0(VO_OS_X11_Display__DisplayDesc_Open+0x1377) [0x400f3c47] 5: /usr/local/lib/liboo2c_vo.so.0(VO_OS_Probe__OpenDisplay+0x204) [0x400ff544] 6: VisualPrefs [0x804c0c2] 7: VisualPrefs [0x804c522] 8: /lib/libc.so.6(__libc_start_main+0xc6) [0x404d0dc6] 9: VisualPrefs [0x804bfb1] The problem appears to be that the 'theme' element in the DisplayPrefsDesc object isn't being cleared when the object is allocated. Adding a statement to VO:OS:X11:Display.Mod to explicitly assign an empty string to 'theme' cures the problem. This problem does not occur when VisualPrefs is compiled with oo2c_32-2.0.17, so suspicion immediately falls on the change to the allocator in 2.0.18 to use GC_malloc_atomic in some cases. 'man GC_malloc_atomic' says that GC_malloc_atomic doesn't clear the allocated memory, which is consistent with the observed behaviour. However, the DisplayPrefsDesc object does contain pointers, so GC_malloc_atomic shouldn't be getting called. Frank Copeland -- All a man needs out of life is a place to sit 'n' spit in the fire. |