
Fixes a case of breakpoint confusion on resume caused by having two breakpoints one byte apart. This bug can cause the target program to resume execution a single byte inside an instruction and crash either with SIGILL or a SIGSEGV, or misbehave (depending on how the truncated instruction is decoded). native.(*Thread).StepInstruction should call FindBreakpoint using adjustPC==false because at that point the PC of the thread should already have been adjusted (and it has been).
19 lines
147 B
Go
19 lines
147 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
var g int = 0
|
|
|
|
func compromised()
|
|
|
|
func skipped() {
|
|
g++
|
|
}
|
|
|
|
func main() {
|
|
compromised()
|
|
fmt.Printf("%d\n", g)
|
|
}
|