1
0
mirror of https://github.com/golang/go synced 2024-10-01 22:28:33 -06:00
go/src
Dmitry Vyukov 894024f478 runtime: fix traceback from goexit1
We used to not call traceback from goexit1.
But now tracer does it and crashes on amd64p32:

runtime: unexpected return pc for runtime.getg called from 0x108a4240
goroutine 18 [runnable, locked to thread]:
runtime.traceGoEnd()
    src/runtime/trace.go:758 fp=0x10818fe0 sp=0x10818fdc
runtime.goexit1()
    src/runtime/proc1.go:1540 +0x20 fp=0x10818fe8 sp=0x10818fe0
runtime.getg(0x0)
    src/runtime/asm_386.s:2414 fp=0x10818fec sp=0x10818fe8
created by runtime/pprof_test.TestTraceStress
    src/runtime/pprof/trace_test.go:123 +0x500

Return PC from goexit1 points right after goexit (+0x6).
It happens to work most of the time somehow.

This change fixes traceback from goexit1 by adding an additional NOP to goexit.

Fixes #9931

Change-Id: Ied25240a181b0a2d7bc98127b3ed9068e9a1a13e
Reviewed-on: https://go-review.googlesource.com/5460
Reviewed-by: Russ Cox <rsc@golang.org>
2015-02-28 23:19:57 +00:00
..
archive archive/zip: fix size value in ZIP64 end central directory record 2015-02-26 15:24:32 +00:00
bufio
builtin
bytes bytes, strings: improve documentation for Count functions 2015-01-22 18:28:35 +00:00
cmd cmd/internal/gc, cmd/internal/obj: remove pointless fmt.Sprintf calls 2015-02-28 20:44:36 +00:00
compress all: don't refer to code.google.com/p/go{,-wiki}/ 2015-02-06 14:41:47 +00:00
container
crypto crypto/x509: skip tests not made for darwin/arm 2015-02-27 19:38:33 +00:00
database/sql database/sql: reduce lock contention in Stmt.connStmt 2015-01-24 09:56:25 +00:00
debug
encoding encoding/xml: add more marshalTests tests. 2015-02-25 23:56:21 +00:00
errors
expvar expvar: fix build 2015-02-05 13:53:29 +00:00
flag
fmt cmd/gc: allocate buffers for non-escaped strings on stack 2015-01-28 20:12:38 +00:00
go mime/quotedprintable: create the package 2015-02-26 20:09:28 +00:00
hash
html all: don't refer to code.google.com/p/go{,-wiki}/ 2015-02-06 14:41:47 +00:00
image image/draw: add a fast path for Gray src images. 2015-02-28 21:43:39 +00:00
index/suffixarray
internal os: Use GetComputerNameEx to get Hostname on win32 2015-02-25 23:16:44 +00:00
io
lib9 [dev.cc] all: merge master (5f1efe7) into dev.cc 2015-02-13 12:51:56 -05:00
libbio
liblink liblink: delete unused code 2015-02-26 19:44:08 +00:00
log log: add SetOutput method on Logger 2015-01-30 16:00:10 +00:00
math math/big: export Float.MinPrec 2015-02-26 17:01:16 +00:00
mime mime/quotedprintable: create the package 2015-02-26 20:09:28 +00:00
net net: disable TestTCPReadWriteAllocs on darwin 2015-02-28 20:43:55 +00:00
os Revert "os: set TMPDIR on darwin/arm" 2015-02-28 02:40:03 +00:00
path path/filepath: add example for filepath.Split 2015-02-20 07:35:57 +00:00
reflect Call --> CallSlice in two spots. No logic change, docs only. 2015-02-22 17:22:04 +00:00
regexp regexp: update URLs in tests 2015-01-26 01:54:28 +00:00
runtime runtime: fix traceback from goexit1 2015-02-28 23:19:57 +00:00
sort sort: fixed small typo in comments 2015-02-08 23:38:50 +00:00
strconv strconv: simplified logic resulting in faster float formatting 2015-02-11 17:45:19 +00:00
strings bytes, strings: improve documentation for Count functions 2015-01-22 18:28:35 +00:00
sync sync: add active spinning to Mutex 2015-02-24 10:53:48 +00:00
syscall syscall: make pwd process-wide on Plan 9 2015-02-28 18:17:35 +00:00
testing testing: pad benchmark names to align results 2015-02-07 21:52:25 +00:00
text
time Build fix for plan9 after 8bf13838eb. 2015-02-08 22:30:46 +00:00
unicode unicode: Fixed an out of date comment (MaxLatin1, not Latin1Max). 2015-02-16 21:35:33 +00:00
unsafe unsafe: minor doc string improvements 2015-01-28 19:42:15 +00:00
all.bash
all.bat
all.rc
androidtest.bash androidtest.bash: remove use of cp --preserve. 2015-02-13 21:16:25 +00:00
clean.bash
clean.bat
clean.rc
make.bash [dev.cc] cmd/go: fix expansion of 'std', add 'cmd' 2015-02-23 15:13:17 +00:00
make.bat [dev.cc] cmd/go: fix expansion of 'std', add 'cmd' 2015-02-23 15:13:17 +00:00
Make.dist
make.rc [dev.cc] cmd/go: fix expansion of 'std', add 'cmd' 2015-02-23 15:13:17 +00:00
nacltest.bash cmd/dist: reactivate vfp detection on linux/arm 2015-02-10 00:17:06 +00:00
race.bash [dev.cc] cmd/go: fix expansion of 'std', add 'cmd' 2015-02-23 15:13:17 +00:00
race.bat [dev.cc] cmd/go: fix expansion of 'std', add 'cmd' 2015-02-23 15:13:17 +00:00
run.bash [dev.cc] cmd/go: fix expansion of 'std', add 'cmd' 2015-02-23 15:13:17 +00:00
run.bat [dev.cc] cmd/go: fix expansion of 'std', add 'cmd' 2015-02-23 15:13:17 +00:00
run.rc build: restore original timeouts in run.rc 2015-02-27 16:58:18 +00:00