summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/runtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/runtime.c')
-rw-r--r--src/pkg/runtime/runtime.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/runtime/runtime.c b/src/pkg/runtime/runtime.c
index 6f359e184..4dcd3da15 100644
--- a/src/pkg/runtime/runtime.c
+++ b/src/pkg/runtime/runtime.c
@@ -6,6 +6,7 @@
int32 panicking = 0;
int32 maxround = sizeof(uintptr);
+int32 fd = 1;
int32
gotraceback(void)
@@ -23,6 +24,7 @@ sys·panicl(int32 lno)
{
uint8 *sp;
+ fd = 2;
if(panicking) {
printf("double panic\n");
exit(3);
@@ -66,6 +68,7 @@ sys·throwinit(void)
void
throw(int8 *s)
{
+ fd = 2;
printf("throw: %s\n", s);
sys·panicl(-1);
*(int32*)0 = 0; // not reached