aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/panic.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/panic.go')
-rw-r--r--src/runtime/panic.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/panic.go b/src/runtime/panic.go
index 121f2022a4..b402c39cac 100644
--- a/src/runtime/panic.go
+++ b/src/runtime/panic.go
@@ -1120,6 +1120,10 @@ func fatalthrow(t throwType) {
// Switch to the system stack to avoid any stack growth, which may make
// things worse if the runtime is in a bad state.
systemstack(func() {
+ if isSecureMode() {
+ exit(2)
+ }
+
startpanic_m()
if dopanic_m(gp, pc, sp) {