From 9b8e4d16614807607c0d46528285f0f67e123be5 Mon Sep 17 00:00:00 2001 From: joohhnnn <68833933+joohhnnn@users.noreply.github.com> Date: Tue, 4 Apr 2023 13:45:17 +0800 Subject: [PATCH] Update analysis.go The reason for the modification is that the original comment mentioned "push zeroes onto the bitvector," which is not accurate. In this scenario, the algorithm sets bits (with a value of 1) on the bitvector, not pushing zeroes. This ensures that the algorithm can correctly mark the following 32 bytes as data. --- core/vm/analysis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/vm/analysis.go b/core/vm/analysis.go index 4aa8cfe70f11..38af9084aca1 100644 --- a/core/vm/analysis.go +++ b/core/vm/analysis.go @@ -63,7 +63,7 @@ func (bits *bitvec) codeSegment(pos uint64) bool { // codeBitmap collects data locations in code. func codeBitmap(code []byte) bitvec { // The bitmap is 4 bytes longer than necessary, in case the code - // ends with a PUSH32, the algorithm will push zeroes onto the + // ends with a PUSH32, the algorithm will set bits on the // bitvector outside the bounds of the actual code. bits := make(bitvec, len(code)/8+1+4) return codeBitmapInternal(code, bits)