aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/mfinal.c
diff options
context:
space:
mode:
authorRémy Oudompheng <oudomphe@phare.normalesup.org>2012-05-30 08:04:11 +0200
committerRémy Oudompheng <oudomphe@phare.normalesup.org>2012-05-30 08:04:11 +0200
commit348087877cc02948d062bc770a4f4d67b2819797 (patch)
treeb0a57a920cd098fd8f57f8a44720282cbd7a9b50 /src/pkg/runtime/mfinal.c
parent4e0749a47805912a528326e3a63e5f0342b19b59 (diff)
downloadgo-348087877cc02948d062bc770a4f4d67b2819797.tar.xz
runtime: do not unset the special bit after finalization.
A block with finalizer might also be profiled. The special bit is needed to unregister the block from the profile. It will be unset only when the block is freed. Fixes #3668. R=golang-dev, rsc CC=golang-dev, remy https://golang.org/cl/6249066
Diffstat (limited to 'src/pkg/runtime/mfinal.c')
-rw-r--r--src/pkg/runtime/mfinal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pkg/runtime/mfinal.c b/src/pkg/runtime/mfinal.c
index c6f2b54219..1fa5ea401d 100644
--- a/src/pkg/runtime/mfinal.c
+++ b/src/pkg/runtime/mfinal.c
@@ -150,8 +150,7 @@ runtime·addfinalizer(void *p, void (*f)(void*), int32 nret)
tab = TAB(p);
runtime·lock(tab);
if(f == nil) {
- if(lookfintab(tab, p, true, nil))
- runtime·setblockspecial(p, false);
+ lookfintab(tab, p, true, nil);
runtime·unlock(tab);
return true;
}