Changeset 6da2d6 in git for omalloc


Ignore:
Timestamp:
Nov 12, 2015, 3:45:23 PM (8 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
9eb1e8694ce6e4868f9d9677e607c646e3bb2d96
Parents:
2bf04b125a602824542ca32e0d085ec5fdbaf789
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2015-11-12 15:45:23+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2015-11-12 15:48:44+01:00
Message:
omalloc: disable debug stuff unless configured with --enable-debug

remove --with-debug (being consistent with the main configure)

From info file of GCC/ C Extensions

On some machines it may be impossible to determine the return address of any function other than the current one; in such cases, or when the top of the stack has been reached, this function returns 0 or a random value. In addition, __builtin_frame_address may be used to determine if the top of the stack has been reached.

Calling this function with a nonzero argument can have unpredictable effects, including crashing the calling program. As a result, calls that are considered unsafe are diagnosed when the -Wframe-address option is in effect. Such calls should only be made in debugging situations.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • omalloc/configure.ac

    r2bf04b r6da2d6  
    7272  [ --without-inline   do not inline])
    7373AC_ARG_WITH(
    74   debug,
    75   [ --without-debug    disable all debugging facilities])
    76 AC_ARG_WITH(
    7774  track,
    7875  [ --without-track    disable debug tracking functionality])
     
    9390  [ --with-internal-debug
    9491                       turn on internal debugging])
     92AC_ARG_ENABLE(
     93  debug,
     94  [ --enable-debug    include backtrace stuff])
    9595dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
    9696dnl compiler/make  config
     
    415415save_cflags="$CFLAGS"
    416416AC_MSG_CHECKING(whether to disable debugging)
    417 if test "$with_debug" != no; then
     417if test "$enable_debug" = yes; then
    418418AC_MSG_RESULT(no)
    419419CFLAGS="$CFLAGS -g"
     
    459459dnl backtrace business
    460460dnl
     461if test "x$with_track" != xno; then
    461462AC_MSG_CHECKING(whether GET_RET_ADDR works)
    462463AC_CACHE_VAL(ac_cv_get_return_addr_works,
     
    515516if test "$ac_cv_get_backtrace_works" = yes; then
    516517AC_DEFINE(OM_GET_BACKTRACE_WORKS,1,"Whether omInitGetBackTrace () works")
     518fi
     519else
     520   AC_MSG_CHECKING(whether GET_RET_ADDR works)
     521   ac_cv_get_return_addr_works=no
     522   AC_MSG_RESULT($ac_cv_get_return_addr_works)
     523   AC_MSG_CHECKING(whether omGetBackTrace works)
     524   ac_cv_get_backtrace_works=no
     525   AC_MSG_RESULT($ac_cv_get_backtrace_works)
    517526fi
    518527
Note: See TracChangeset for help on using the changeset viewer.