diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-06-07 18:05:45 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-06-07 18:05:45 +0000 |
commit | ce311a8cae4489058f8601bebdf511b7fb5fce26 (patch) | |
tree | 81494302b4f5708ad6c96bad6ecfd9c109574c38 /libgo/go/runtime/proc.go | |
parent | 48ec607c1f8d1f1783850f1d2729fd23716b1b1b (diff) | |
parent | dc23fb4d72eed9ea09fbf4704b26e0e36414a57a (diff) | |
download | gcc-ce311a8cae4489058f8601bebdf511b7fb5fce26.zip gcc-ce311a8cae4489058f8601bebdf511b7fb5fce26.tar.gz gcc-ce311a8cae4489058f8601bebdf511b7fb5fce26.tar.bz2 |
Merge from trunk revision 261284.
From-SVN: r261288
Diffstat (limited to 'libgo/go/runtime/proc.go')
-rw-r--r-- | libgo/go/runtime/proc.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/go/runtime/proc.go b/libgo/go/runtime/proc.go index 20fa0ad..a6746c9 100644 --- a/libgo/go/runtime/proc.go +++ b/libgo/go/runtime/proc.go @@ -423,6 +423,12 @@ func releaseSudog(s *sudog) { // funcPC returns the entry PC of the function f. // It assumes that f is a func value. Otherwise the behavior is undefined. +// CAREFUL: In programs with plugins, funcPC can return different values +// for the same function (because there are actually multiple copies of +// the same function in the address space). To be safe, don't use the +// results of this function in any == expression. It is only safe to +// use the result as an address at which to start executing code. +// // For gccgo note that this differs from the gc implementation; the gc // implementation adds sys.PtrSize to the address of the interface // value, but GCC's alias analysis decides that that can not be a |