runtime.Rethrow fix; llgo/ssa: IndirectJump fix
This commit is contained in:
@@ -48,6 +48,9 @@ func GoDeferData() Pointer
|
||||
//go:linkname Unreachable llgo.unreachable
|
||||
func Unreachable()
|
||||
|
||||
//go:linkname Exit C.exit
|
||||
func Exit(Int)
|
||||
|
||||
//go:linkname AllocaSigjmpBuf llgo.sigjmpbuf
|
||||
func AllocaSigjmpBuf() Pointer
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ type Defer struct {
|
||||
Addr unsafe.Pointer // sigjmpbuf
|
||||
Bits uintptr
|
||||
Link *Defer
|
||||
Rund int // index of RunDefers
|
||||
Rund unsafe.Pointer // block address after RunDefers
|
||||
}
|
||||
|
||||
// Panic panics with a value.
|
||||
@@ -49,8 +49,7 @@ func Rethrow(link *Defer) {
|
||||
ptr := excepKey.Get()
|
||||
TracePanic(*(*Eface)(ptr))
|
||||
c.Free(ptr)
|
||||
// TODO(xsw): noreturn
|
||||
// c.Unreachable()
|
||||
c.Exit(2)
|
||||
} else {
|
||||
c.Siglongjmp(link.Addr, 1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user