Hi Vegard, Vegard Nossum wrote: > @@ -120,6 +120,14 @@ void *jit_magic_trampoline(struct compilation_unit *cu) > > pthread_mutex_unlock(&cu->mutex); > > + /* XXX: > + * > + * 09:58 < penberg> but you need to be careful > + * 09:58 < penberg> not to allow any threads to run the jit'd code > + * before classes are initialized > + */ > + synchronize_clinit(); > + > return ret; > }
I would prefer not to merge this. Yes, we don't support threading yet but bugs like this tend to be very nasty to debug and easy to overlook. Can't we add a "init_done" and a pthread_cond_t to struct compilation_unit and force other threads to block until synchronize_clinit() is done? Pekka ------------------------------------------------------------------------------ _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel