未验证 提交 a31631b5 编写于 作者: A Alessandro Arzilli 提交者: GitHub

proc/test: fix TestStepCallPtr on linux/386 (#2193)

The test needs to set a breakpoint on main.CallFn after the prologue,
on linux/386 this function does not have any instruction after the
prologue on the function header line  because it doesn't need to
allocate space for local variables. Change the fixture so that this
isn't a problem.

This bug results on the test failing a small percentage of the time.
Co-authored-by: Na <a@kra>
上级 a2550b48
......@@ -2,12 +2,12 @@ package main
var n = 0
func CallFn2() {
func CallFn2(x int) {
n++
}
func CallFn(fn func()) {
fn()
func CallFn(x int, fn func(x int)) {
fn(x + 1)
}
func CallEface(eface interface{}) {
......@@ -17,6 +17,6 @@ func CallEface(eface interface{}) {
}
func main() {
CallFn(CallFn2)
CallFn(0, CallFn2)
CallEface(n)
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册