From 055dfc204c7b2c8eae1603b09fe71deb73f0e627 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 16 Jul 2014 19:26:36 -0400 Subject: [PATCH] liblink: fix precedence bug in pcdata comparison As written, the ! applies before the &1. This would crash writing out missing pcdata tables if we ever used non-contiguous IDs in a function. We don't, but fix anyway. LGTM=iant, minux R=minux, iant CC=golang-codereviews https://golang.org/cl/117810047 --- src/liblink/pcln.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liblink/pcln.c b/src/liblink/pcln.c index 4b2b85543e..f0ee1dc672 100644 --- a/src/liblink/pcln.c +++ b/src/liblink/pcln.c @@ -279,7 +279,7 @@ linkpcln(Link *ctxt, LSym *cursym) } // pcdata. for(i=0; i>(i%32))&1) + if(((havepc[i/32]>>(i%32))&1) == 0) continue; funcpctab(ctxt, &pcln->pcdata[i], cursym, "pctopcdata", pctopcdata, (void*)(uintptr)i); } -- 2.48.1