
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: a <a@kra>
23 lines
223 B
Go
23 lines
223 B
Go
package main
|
|
|
|
var n = 0
|
|
|
|
func CallFn2(x int) {
|
|
n++
|
|
}
|
|
|
|
func CallFn(x int, fn func(x int)) {
|
|
fn(x + 1)
|
|
}
|
|
|
|
func CallEface(eface interface{}) {
|
|
if eface != nil {
|
|
n++
|
|
}
|
|
}
|
|
|
|
func main() {
|
|
CallFn(0, CallFn2)
|
|
CallEface(n)
|
|
}
|