projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
1946042
)
runtime: Tweak runtime.Callers for Go 1 compatibility.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 22 May 2012 21:52:56 +0000
(21:52 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 22 May 2012 21:52:56 +0000
(21:52 +0000)
From-SVN: r187781
libgo/runtime/go-callers.c
patch
|
blob
|
history
diff --git
a/libgo/runtime/go-callers.c
b/libgo/runtime/go-callers.c
index 2d8fce73de4c39b675c0606fde1183b6895521d7..3eea5f2ceadfd54d329a52f372424e174866c408 100644
(file)
--- a/
libgo/runtime/go-callers.c
+++ b/
libgo/runtime/go-callers.c
@@
-72,5
+72,8
@@
int Callers (int, struct __go_open_array)
int
Callers (int skip, struct __go_open_array pc)
{
- return runtime_callers (skip, (uintptr *) pc.__values, pc.__count);
+ /* In the Go 1 release runtime.Callers has an off-by-one error,
+ which we can not correct because it would break backward
+ compatibility. Adjust SKIP here to be compatible. */
+ return runtime_callers (skip - 1, (uintptr *) pc.__values, pc.__count);
}