1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* configure.in: add -fno-omit-frame-pointer if libexecinfo is used.

At least on FreeBSD ruby will crash on getting C backtrace
  when it is compiled with other than -O0.

* vm_dump.c: enable backtrace on FreeBSD even if with optimizations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-12-12 07:36:32 +00:00
parent b3f491d3cb
commit 486795d951
3 changed files with 14 additions and 3 deletions

View file

@ -1,3 +1,11 @@
Wed Dec 12 15:30:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
* configure.in: add -fno-omit-frame-pointer if libexecinfo is used.
At least on FreeBSD ruby will crash on getting C backtrace
when it is compiled with other than -O0.
* vm_dump.c: enable backtrace on FreeBSD even if with optimizations.
Wed Dec 12 16:08:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/rdoc/test_rdoc_rdoc.rb (TestRDocRDoc#test_normalized_file_list_non_file_directory):

View file

@ -2378,6 +2378,12 @@ AS_CASE(["$target_cpu-$target_os"],
AC_CHECK_HEADERS([execinfo.h])
if test "x$ac_cv_header_execinfo_h" = xyes; then
AC_CHECK_LIB([execinfo], [backtrace])
execinfo_frame_pointer=no
RUBY_TRY_CFLAGS(-fno-omit-frame-pointer, [execinfo_frame_pointer=yes])
if test "x$execinfo_frame_pointer" = xyes; then
optflags="${optflags+$optflags }-fno-omit-frame-pointer"
CFLAGS="$CFLAGS -fno-omit-frame-pointer"
fi
fi])
AC_CHECK_FUNCS(backtrace)

View file

@ -424,9 +424,6 @@ rb_vmdebug_thread_dump_state(VALUE self)
return Qnil;
}
#if defined(__FreeBSD__) && defined(__OPTIMIZE__)
#undef HAVE_BACKTRACE
#endif
#ifndef HAVE_BACKTRACE
#define HAVE_BACKTRACE 0
#endif