projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0fb7a1
)
[sgen] Fix verify-before-allocs.
author
Jon Purdy
<evincarofautumn@gmail.com>
Thu, 13 Oct 2016 21:06:25 +0000
(14:06 -0700)
committer
Jon Purdy
<evincarofautumn@gmail.com>
Thu, 13 Oct 2016 21:06:25 +0000
(14:06 -0700)
sgen_check_whole_heap_stw() calls sgen_stop_world(), which assumes the
GC lock is held.
mono/sgen/sgen-alloc.c
patch
|
blob
|
history
diff --git
a/mono/sgen/sgen-alloc.c
b/mono/sgen/sgen-alloc.c
index d18fc7cfc73462dcbc69a84a794258fcf196a106..fa6046f519a7eca2a9bb6b91854e07ac7058da5c 100644
(file)
--- a/
mono/sgen/sgen-alloc.c
+++ b/
mono/sgen/sgen-alloc.c
@@
-402,8
+402,11
@@
sgen_alloc_obj (GCVTable vtable, size_t size)
int current_alloc = InterlockedIncrement (&alloc_count);
if (verify_before_allocs) {
- if ((current_alloc % verify_before_allocs) == 0)
+ if ((current_alloc % verify_before_allocs) == 0) {
+ LOCK_GC;
sgen_check_whole_heap_stw ();
+ UNLOCK_GC;
+ }
}
if (collect_before_allocs) {
if (((current_alloc % collect_before_allocs) == 0) && nursery_section) {