This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r268358 - in /trunk: gcc/go/gofrontend/MERGE li...


Author: ian
Date: Tue Jan 29 00:49:23 2019
New Revision: 268358

URL: https://gcc.gnu.org/viewcvs?rev=268358&root=gcc&view=rev
Log:
    runtime: use the call instruction's PC for panic-in-runtime detection
    
    If a panic happens in the runtime we turn that into a fatal error.
    We use the caller's PC to determine if the panic call is inside
    the runtime. getcallerpc returns the PC immediately after the
    call instruction. If the call is the very last instruction of a
    function, it may not find this PC belong to a runtime function,
    giving false result. We need to back off the PC by 1 to the call
    instruction.
    
    The gc runtime doesn't do this because the gc compiler always
    emit an instruction following a panic call, presumably an UNDEF
    instruction which turns into an architecture-specific illegal
    instruction. Our compiler doesn't do this.
    
    Reviewed-on: https://go-review.googlesource.com/c/159437

Modified:
    trunk/gcc/go/gofrontend/MERGE
    trunk/libgo/go/runtime/panic.go
    trunk/libgo/runtime/go-runtime-error.c


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]