
debugCallV2 for amd64 has a bug where it corrupts the flags registers every time it is called, this commit works around that problem by restoring flags one extra time to its original value after stepping out of debugCallV2. Fixes #2985
20 lines
192 B
Go
20 lines
192 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func g() {
|
|
}
|
|
|
|
func main() {
|
|
g()
|
|
a := os.Args[1] == "1"
|
|
if a {
|
|
fmt.Printf("true branch %v\n", a)
|
|
} else {
|
|
fmt.Printf("false branch %v\n", a)
|
|
}
|
|
}
|