Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variable declaration on wrong line in stacktrace_libunwind-inl.h #11

Closed
GoogleCodeExporter opened this issue Aug 14, 2015 · 2 comments
Closed

Comments

@GoogleCodeExporter
Copy link

(First, thank you very much for providing the latest release --- with the
one fix below, it compiles on RHEL4 x86_64 and even seems to be working
with C++ exceptions.)

What steps will reproduce the problem?
1. LDFLAGS=-L../libunwind/lib CPPFLAGS=-I../libunwind/include ./configure
2. make 

Error message:

src/stacktrace_libunwind-inl.h:68: error: `ret' was not declared in this scope

This patch lets it build:

--- t/google-perftools-0.90/src/stacktrace_libunwind-inl.h      2007-04-12
17:25:50.000000000 -0700
+++ google-perftools-0.90/src/stacktrace_libunwind-inl.h        2007-04-16
17:15:46.000000000 -0700
@@ -65,12 +65,12 @@
   }

   unw_getcontext(&uc);
-  ret = unw_init_local(&cursor, &uc);
+  int ret = unw_init_local(&cursor, &uc);
   assert(ret >= 0);
   skip_count++;         // Do not include the "GetStackTrace" frame

   while (n < max_depth) {
-    int ret = unw_get_reg(&cursor, UNW_REG_IP, (unw_word_t *) &ip);
+    ret = unw_get_reg(&cursor, UNW_REG_IP, (unw_word_t *) &ip);
     if (ret < 0)
       break;
     if (skip_count > 0) {


What version of the product are you using? On what operating system?
google-perftools-0.90, RHEL4 on x86_64, gcc-3.4.6, libunwind-snap-070410.


Please provide any additional information below.

Full command and error:

$ make
if /bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.
-I./src  -I./src -I/home/rickcox/local/include -DNO_FRAME_POINTER -g -O2
-MT stacktrace.lo -MD -MP -MF ".deps/stacktrace.Tpo" -c -
o stacktrace.lo `test -f 'src/stacktrace.cc' || echo './'`src/stacktrace.cc; \
then mv -f ".deps/stacktrace.Tpo" ".deps/stacktrace.Plo"; else rm -f
".deps/stacktrace.Tpo"; exit 1; fi
mkdir .libs
 g++ -DHAVE_CONFIG_H -I. -I. -I./src -I./src -I/home/rickcox/local/include
-DNO_FRAME_POINTER -g -O2 -MT stacktrace.lo -MD -MP -MF
.deps/stacktrace.Tpo -c src/stacktrace.cc  -fPIC -DPIC -o .libs/stacktrac
e.o
In file included from src/stacktrace.cc:71:
src/stacktrace_libunwind-inl.h: In function `int GetStackTrace(void**, int,
int)':
src/stacktrace_libunwind-inl.h:68: error: `ret' was not declared in this scope

Original issue reported on code.google.com by rick....@gmail.com on 17 Apr 2007 at 12:32

@GoogleCodeExporter
Copy link
Author

Oops!  Definitely a problem.  Thanks for pointing it out; we'll have the fix 
out in
our next release.

Original comment by csilv...@gmail.com on 18 Apr 2007 at 5:37

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Fixed with the 0.91 release, now up on Google Code.

Original comment by csilv...@gmail.com on 19 Apr 2007 at 1:25

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant