diff options
| author | Rob Pike <r@golang.org> | 2008-07-12 11:30:53 -0700 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2008-07-12 11:30:53 -0700 |
| commit | 2da9783e2b79f0c9a05087ba014bb93d03e191ea (patch) | |
| tree | 49d2daa2c96b564d67b42b864f3364000eafd9d0 /src/runtime/rt2_amd64.c | |
| parent | 5a81d1f29fad531a639379f78d0049638449b603 (diff) | |
| download | go-2da9783e2b79f0c9a05087ba014bb93d03e191ea.tar.xz | |
preserve AX across stack jump so C routines return correct value when triggering morestack.
SVN=126935
Diffstat (limited to 'src/runtime/rt2_amd64.c')
| -rw-r--r-- | src/runtime/rt2_amd64.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/runtime/rt2_amd64.c b/src/runtime/rt2_amd64.c index dac1c4684a..a5f5d109a9 100644 --- a/src/runtime/rt2_amd64.c +++ b/src/runtime/rt2_amd64.c @@ -8,8 +8,6 @@ extern int32 debug; static int8 spmark[] = "\xa7\xf1\xd9\x2a\x82\xc8\xd8\xfe"; -extern void morestack2(); - void traceback(uint8 *pc, uint8 *sp, void* r15) { @@ -29,8 +27,8 @@ traceback(uint8 *pc, uint8 *sp, void* r15) name = "panic"; for(;;){ callpc = pc; - if((uint8*)morestack2 == pc) { - // call site is morestack2(); pop to earlier stack block to get true caller + if((uint8*)retfromnewstack == pc) { + // call site is retfromnewstack(); pop to earlier stack block to get true caller stktop = (Stktop*)g.stackbase; g.stackbase = stktop->oldbase; g.stackguard = stktop->oldguard; |
