diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2012-12-23 12:53:34 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2012-12-23 12:53:34 +0400 |
commit | d4cbed4d93167a0b4907abd237ff234007fae59a (patch) | |
tree | 8dc27363b0b31deb252524433f8416a3fb196fc3 /mark.c | |
parent | 1b5b1b71cea18fca2e9a9990f8684c0b10e35286 (diff) | |
download | bdwgc-d4cbed4d93167a0b4907abd237ff234007fae59a.tar.gz |
Fix GC_print_trace missing unlock
* mark.c (GC_print_trace): Perform UNLOCK (if "lock" is on) before
return (inside loop).
Diffstat (limited to 'mark.c')
-rw-r--r-- | mark.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1463,7 +1463,10 @@ void GC_print_trace(word gc_no, GC_bool lock) for (i = GC_trace_buf_ptr-1; i != GC_trace_buf_ptr; i--) { if (i < 0) i = TRACE_ENTRIES-1; p = GC_trace_buf + i; - if (p -> gc_no < gc_no || p -> kind == 0) return; + if (p -> gc_no < gc_no || p -> kind == 0) { + if (lock) UNLOCK(); + return; + } printf("Trace:%s (gc:%u,bytes:%lu) 0x%X, 0x%X\n", p -> kind, (unsigned)p -> gc_no, (unsigned long)p -> bytes_allocd, |