Skip to main content.


This is the archive for November 2008

Saturday, November 15, 2008

Look at this code:

GarbageString *str = new GarbageString( vm, (const wchar_t *) Sys::dynlib_voidp_call( fa->m_fAddress, bufpos, bufsize ), -1 );
vm->retval( str );

It sounds equivalent to this:

const wchar_t *ws = (const wchar_t *) Sys::dynlib_voidp_call( fa->m_fAddress, bufpos, bufsize )
GarbageString *str = new GarbageString( vm, ws, -1 );
vm->retval( str );

But for Visual C 2005 it's not so equivalent. In release build the second one crashes; the reason is in the fact that dynlib_voidp_call() mangles with some registers via assembly, apparently, but a wise compiler should not rely on register persistence across foreign function calls. Also, the problem is in the ws variable. It seems its value gets lost between the return from dynlib_voidp_call and the call on the next line. Be warned...

Wednesday, November 05, 2008

From today's chat in (Sun OS distro) official channel.

<evocallaghan> World is d00med !
<jonnymind> Or maybe, world is unrealized.
<jonnymind> Ya know, Unreal is more popular here in Europe.
<cypromis> witcher
<cypromis> the world is witcherised
<cypromis> lol
<cypromis> and everybody is moving to second life anyway
<cypromis> Life 2.0
<cypromis> and that before Life 1.0 even reached alpha stage