Skip to content

Commit

Permalink
runtime/cgo: enable arm64 EXC_BAD_ACCESS handler
Browse files Browse the repository at this point in the history
Change-Id: I8e912ff9327a4163b63b8c628aa3546e86ddcc02
Reviewed-on: https://go-review.googlesource.com/8983
Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
  • Loading branch information
crawshaw committed Apr 16, 2015
1 parent db1f9cd commit 9cde36b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/runtime/cgo/gcc_darwin_arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ threadentry(void *v)
ts = *(ThreadStart*)v;
free(v);

darwin_arm_init_thread_exception_port();

crosscall1(ts.fn, setg_gcc, (void*)ts.g);
return nil;
}
Expand Down Expand Up @@ -148,5 +150,8 @@ x_cgo_init(G *g, void (*setg)(void*), void **tlsg, void **tlsbase)
// yes, tlsbase from mrs might not be correctly aligned.
inittls(tlsg, (void**)((uintptr)tlsbase & ~7));

darwin_arm_init_mach_exception_handler();
darwin_arm_init_thread_exception_port();

init_working_dir();
}

0 comments on commit 9cde36b

Please sign in to comment.