This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug go/66303] runtime.Caller() returns infinitely deep stack frames on s390x
- From: "e29253 at jp dot ibm.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 May 2015 05:53:10 +0000
- Subject: [Bug go/66303] runtime.Caller() returns infinitely deep stack frames on s390x
- Auto-submitted: auto-generated
- References: <bug-66303-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66303
--- Comment #2 from Tatsushi Inagaki <e29253 at jp dot ibm.com> ---
The first invocation of runtime.Caller() with skip==2 successfully detects
kickoff() in callback(), and thus returns ok==true.
The problem is that the succeeding invocations of runtime.Caller() with
skip==3, 4, 5, ... still continue returning ok==true. This is because
callback() returns index==1 and a non-zero pc, which are recognized as valid
information by runtime.Caller() in runitme/go-caller.c. I attached a gdb
session of the second invocation of runtime.Caller() with skip==3.