[Mono-list] External pthread delegate call

Dick Porter dick@ximian.com
20 Jan 2003 13:43:17 +0000

On Sun, 2003-01-19 at 10:45, Jerome Laban wrote:
> After a small investigation, I've discovered that the method
> mono_get_domain is called from mono_jit_compile_method. All this is
> directly called from a thread that has not been created the mono
> runtine, thus not having any TLS containing the original domain.
> The method mono_get_domain returns a NULL pointer that causes the line
> :
>     (jit.c:3815) jit_code_hash = target_domain->jit_code_hash;
> to dereference a NULL pointer.
> Am I missing something ? Should the mono runtime also intercept any
> pthreads calls and how can this be done ?

You need to arrange for the threads to call mono_thread_attach() before
they execute any managed code for the first time.

- Dick