#2 Internal error: too many function context pops.

closed
nobody
None
5
2005-02-17
2005-02-12
Anonymous
No

Hi,
I'm trying out the bounds checking extension with gcc
3.4.3 right now on a fairly large program.
CFLAGS are "-fbounds-checking -ggdb -Wall".
The program starts ok, but very quickly I get:
/usr/src/gcc-
3.4.3/gcc/bounds/lib/functions.c:179:Internal error: too
many function context pops.
Aborted

This happens just after the program spawns a new
thread.

Any ideas if I can get it working or not? I'm sure I've got
a memory problem in there and I'd like to get this
working to see if I can track it down before I start
combing through thousands of lines :)

Discussion

  • Justin Hammond
    Justin Hammond
    2005-02-12

    Logged In: YES
    user_id=10633

    Here is a GDB backtrace if it helps:
    /usr/src/gcc-3.4.3/gcc/bounds/lib/functions.c:179:Internal
    error: too many function context pops.

    Program received signal SIGABRT, Aborted.
    [Switching to Thread -1097602128 (LWP 32337)]
    0x00b6cc32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
    (gdb) bt full
    #0 0x00b6cc32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
    No symbol table info available.
    #1 0x00bab989 in raise () from /lib/tls/libc.so.6
    No symbol table info available.
    #2 0x00bad342 in abort () from /lib/tls/libc.so.6
    No symbol table info available.
    #3 0x08070810 in __bounds_internal_error (message=0x0,
    filename=0x6 <Address 0x6 out of bounds>, line=32337)
    at /usr/src/gcc-3.4.3/gcc/bounds/lib/error.c:215
    No locals.
    #4 0x0807233f in __bounds_pop_function
    (name=0x8086c47 "qm_wait", nesting_nr=6)
    at /usr/src/gcc-3.4.3/gcc/bounds/lib/functions.c:215
    old_mask = {__val = {4222451713, 134813144,
    134813144, 134813144, 134813144, 134813169, 134813655,
    134813144, 134813655,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144018560, 4, 121, 134769649,
    134649867, 144018560, 3197364448, 3197364616,
    134720166,
    144002192, 12, 1, 134772600}}
    #5 0x0805819c in qm_wait (qi=0x8958c80, tmout=60) at
    queuemanager.c:122
    now = {tv_sec = 1108218642, tv_usec = 22848}
    timeout = {tv_sec = 1108218702, tv_nsec = 22848}
    #6 0x08059525 in init_messqueue (arg=0x8958c80) at
    messagequeue.c:73
    ret = 0
    messq = (myqueues *) 0x8958c80
    candie = 0
    mqi = (messqitm *) 0x0
    #7 0x0011e7fc in start_thread () from /lib/tls/libpthread.so.0
    No symbol table info available.
    #8 0x00c5faba in clone () from /lib/tls/libc.so.6
    No symbol table info available.

     
  • Logged In: YES
    user_id=844843

    The problem is that you did not use -D_REENTRANT when
    compiling the file that contains the function main. When
    this is done the bounds-checking code will become thread safe.
    The -D_REENTRANT option MUST be used anyway when compiling
    programs that use threads.

     
    • status: open --> closed