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 751ad998c9..6d6b05b201 100644
--- a/src/runtime/panic.go
+++ b/src/runtime/panic.go
@@ -1148,6 +1148,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) {