-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
This test case crashes when compiled with gccgo. The parameter s is read from the wrong position on the stack. The problem is most likely that the empty struct field in large leads to a disagreement between the Go code and libffi.
package main
import (
"fmt"
"reflect"
)
type large struct {
f1, f2, f3, f4 *byte
empty struct{}
}
func F(str string, l large, s []string) {
if len(s) != 1 || s[0] != "hi" {
fmt.Printf("bad value for s: %v\n", s)
panic("bad slice")
}
}
func main() {
params := []reflect.Value{
reflect.ValueOf("str"),
reflect.ValueOf(large{}),
reflect.ValueOf([]string{"hi"}),
}
reflect.ValueOf(F).Call(params)
}Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.