[Mono-bugs] [Bug 463021] New: Race in --regression code and delegate freeing

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 30 17:37:01 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=463021


           Summary: Race in --regression code and delegate freeing
           Product: Mono: Runtime
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: gnorton at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


There is a race in the --regression code related to finalizers freeing
delegates.

In driver.c we do:

                mono_internal_hash_table_destroy (&(domain->jit_code_hash));
                mono_jit_code_hash_init (&(domain->jit_code_hash));

However in gc.c we do:

                if (del->delegate_trampoline)
                        mono_delegate_free_ftnptr ((MonoDelegate*)o);

Which in turn calls:
  mono_runtiume_free_method -> mono_jit_free_method ->
mono_internal_hash_table_remove

However since we might have moved on to the next regression test the
g_assert(0) in mono_internal_hash_table_remove will be called, cause we've
already removed the key in the destroy.

A simple hack would be to just remove the assert (maybe make it a warning)

This is exhibiting in crashes on ppc-darwin


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list