• Russ Cox's avatar
    runtime: look up arg stackmap for makeFuncStub/methodValueStub during traceback · f0d44dbe
    Russ Cox authored
    makeFuncStub and methodValueStub are used by reflect as
    generic function implementations. Each call might have
    different arguments. Extract those arguments from the
    closure data instead of assuming it is the same each time.
    
    Because the argument map is now being extracted from the
    function itself, we don't need the special cases in reflect.Call
    anymore, so delete those.
    
    Fixes an occasional crash seen when stack copying does
    not update makeFuncStub's arguments correctly.
    
    Will also help make it safe to require stack maps in the
    garbage collector.
    
    Derived from CL 142000044 by khr.
    
    LGTM=khr
    R=khr
    CC=golang-codereviews
    https://golang.org/cl/143890044
    f0d44dbe
stack.c 23.2 KB