Bug 47762 - EXC_BAD_ACCESS when unloading assembly
Summary: EXC_BAD_ACCESS when unloading assembly
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: 4.8.0 (C9)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Andi McClure
URL:
Depends on:
Blocks:
 
Reported: 2016-11-23 17:27 UTC by Marek Safar
Modified: 2016-11-28 16:22 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
test (6.20 KB, application/zip)
2016-11-23 17:27 UTC, Marek Safar
Details

Description Marek Safar 2016-11-23 17:27:24 UTC
Created attachment 18625 [details]
test

* thread #1: tid = 0x3a568c2, 0x0000000100285746 mono`monoeg_g_str_hash(v1=0x00000001014fe41c) + 38 at ghashtable.c:667, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1014fe41c)
    frame #0: 0x0000000100285746 mono`monoeg_g_str_hash(v1=0x00000001014fe41c) + 38 at ghashtable.c:667
   664 		guint hash = 0;
   665 		char *p = (char *) v1;
   666
-> 667 		while (*p++)
   668 			hash = (hash << 5) - (hash + *p);
   669
   670 		return hash;
(lldb) bt
* thread #1: tid = 0x3a568c2, 0x0000000100285746 mono`monoeg_g_str_hash(v1=0x00000001014fe41c) + 38 at ghashtable.c:667, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1014fe41c)
  * frame #0: 0x0000000100285746 mono`monoeg_g_str_hash(v1=0x00000001014fe41c) + 38 at ghashtable.c:667
    frame #1: 0x00000001002849c2 mono`monoeg_g_hash_table_lookup_extended(hash=0x0000000101500880, key=0x00000001014fe41c, orig_key=0x00007fff5fbff430, value=0x00007fff5fbff428) + 130 at ghashtable.c:328
    frame #2: 0x0000000100284915 mono`monoeg_g_hash_table_lookup(hash=0x0000000101500880, key=0x00000001014fe41c) + 37 at ghashtable.c:311
    frame #3: 0x0000000100165157 mono`mono_image_close_except_pools(image=0x000000010700be00) + 311 at image.c:1746 [opt]
    frame #4: 0x00000001001656cd mono`mono_image_close_except_pools + 23 at image.c:1706 [opt]
    frame #5: 0x00000001001656b6 mono`mono_image_close_except_pools(image=<unavailable>) + 1686 at image.c:1911 [opt]
    frame #6: 0x000000010012a72f mono`mono_assembly_close_except_image_pools(assembly=0x000000010070e900) + 239 at assembly.c:3458 [opt]
    frame #7: 0x000000010016522e mono`mono_image_close_except_pools(image=<unavailable>) + 526 at image.c:1780 [opt]
    frame #8: 0x000000010016414e mono`mono_image_close(image=0x0000000103002400) + 14 at image.c:1990 [opt]
    frame #9: 0x00000001001eaa87 mono`mono_cleanup [inlined] mono_close_exe_image + 23 at domain.c:914 [opt]
    frame #10: 0x00000001001eaa74 mono`mono_cleanup + 4 at domain.c:888 [opt]
    frame #11: 0x00000001000119ce mono`mini_cleanup(domain=<unavailable>) + 974 at mini-runtime.c:4186 [opt]
    frame #12: 0x0000000100086b98 mono`mono_main(argc=<unavailable>, argv=<unavailable>) + 8248 at driver.c:2152 [opt]
    frame #13: 0x0000000100001844 mono`main [inlined] mono_main_with_options(argc=<unavailable>, argv=<unavailable>) + 17 at main.c:45 [opt]
    frame #14: 0x0000000100001833 mono`main(argc=2, argv=<unavailable>) + 1843 at main.c:338 [opt]
    frame #15: 0x00007fff8c1bc5ad libdyld.dylib`start + 1
    frame #16: 0x00007fff8c1bc5ad libdyld.dylib`start + 1
Comment 1 Andi McClure 2016-11-23 21:06:14 UTC
Can you give me more information? Does this happen all the time or was it a one time thing? What version of Mono did you see it on? What are the source of these files, are they the unmodified test-multi tests from mono/tests?
Comment 2 Marek Safar 2016-11-24 08:42:41 UTC
Did you try to run attached test case? The output is from same sources but compiled with csc
Comment 3 Zoltan Varga 2016-11-26 21:16:11 UTC
https://github.com/mono/mono/pull/4029
Comment 4 Zoltan Varga 2016-11-28 16:22:40 UTC
Fixed in master.

Notice (2018-05-21): bugzilla.xamarin.com will be switching to read-only mode on Thursday, 2018-05-25 22:00 UTC.

Please join us on Visual Studio Developer Community and GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs and copy them to the new locations as needed for follow-up. The See Also field on each Bugzilla bug will be updated with a link to its new location when applicable.

After Bugzilla is read-only, if you have new information to add for a bug that does not yet have a matching issue on Developer Community or GitHub, you can create a follow-up issue in the new location. Copy and paste the title and description from this bug, and then add your new details. You can get a pre-formatted version of the title and description here:

In special cases you might also want the comments:

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Note You need to log in before you can comment on or make changes to this bug.