Skip to content

cmd/link: removing deadcode check for reflect.Value.Call causes miscompilation #38515

@mdempsky

Description

@mdempsky

This program now panics at master due to CL 228792:

package main

import "reflect"

type foo struct {}
func (foo) X() { println("ok") }

var h = reflect.Type.Method

func main() {
	v := reflect.ValueOf(foo{})
	m := h(v.Type(), 0)
	m.Func.Call([]reflect.Value{v})
}

It should print "ok".

/cc @cherrymui @bradfitz

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions