#18 Recently introduced segfault

closed-fixed
nobody
None
5
2002-11-08
2002-11-07
No

Configuration is Solaris 2.8, DB 4.1.24, GCC 3.2

CVS checkout done 2002-11-07 14:13 EST

bogofilter -p -v < whatever
segfaults just before printing the keywords.

Reverted to 2002-11-06 00:00 EST
Then there's no segfault.

Discussion

  • Matthias Andree

    Matthias Andree - 2002-11-08

    Logged In: YES
    user_id=2788

    Cannot reproduce. Solaris 2.8 Sparc, gcc 2.95.3, DB 3.2.9.
    Please provide a stack backtrace:
    run "gdb bogofilter core"
    then enter "backtrace full"
    then enter "quit"

     
  • J. Random Hacker

    Logged In: YES
    user_id=517502

    Recompiled same sources with -g and segfault still reproduces.

    Looks like I might need to upgrade gdb, but here's what I've
    got now.

    bash-2.01$ gdb bogofilter core
    GDB is free software and you are welcome to distribute
    copies of it
    under certain conditions; type "show copying" to see the
    conditions.
    There is absolutely no warranty for GDB; type "show
    warranty" for details.
    GDB 4.16 (sparc-sun-solaris2.5),
    Copyright 1996 Free Software Foundation, Inc...
    Core was generated by `./bogofilter -p -v'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /usr/lib/libm.so.1...done.
    Reading symbols from /usr/lib/libc.so.1...done.
    Reading symbols from /usr/lib/libdl.so.1...done.
    Reading symbols from
    /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1...done.
    #0 0xff2b3344 in strlen ()
    (gdb) backtrace full
    No symbol "full" in current context.
    (gdb) backtrace
    #0 0xff2b3344 in strlen ()
    #1 0xff303098 in _doprnt ()
    #2 0xff304b40 in _fprintf ()
    #3 0x126f8 in compute_spamicity (bogostats=0xdcc58, fp=0xdcad0)
    at bogofilter.c:549
    #4 0x12fbc in main (argc=904192, argv=0xdc800) at main.c:171
    (gdb) quit

     
  • J. Random Hacker

    Logged In: YES
    user_id=517502

    Upgraded gdb.

    > gdb bogofilter core
    GNU gdb 5.2.1
    Copyright 2002 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public
    License, and you are
    welcome to change it and/or distribute copies of it under
    certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show
    warranty" for details.
    This GDB was configured as "sparc-sun-solaris2.8"...
    Core was generated by `./bogofilter -p -v'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /usr/lib/libm.so.1...done.
    Loaded symbols for /usr/lib/libm.so.1
    Reading symbols from /usr/lib/libc.so.1...done.
    Loaded symbols for /usr/lib/libc.so.1
    Reading symbols from /usr/lib/libdl.so.1...done.
    Loaded symbols for /usr/lib/libdl.so.1
    Reading symbols from
    /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1...done.
    Loaded symbols for /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
    #0 0xff2b3344 in strlen () from /usr/lib/libc.so.1
    (gdb) backtrace full
    #0 0xff2b3344 in strlen () from /usr/lib/libc.so.1
    No symbol table info available.
    #1 0xff303098 in _doprnt () from /usr/lib/libc.so.1
    No symbol table info available.
    #2 0xff304b40 in fprintf () from /usr/lib/libc.so.1
    No symbol table info available.
    #3 0x000126f8 in compute_spamicity (bogostats=0xdcc58,
    fp=0xdcad0)
    at bogofilter.c:549
    product = 0.0099999997764825821
    invproduct = 0.99000000022351742
    spamicity = 0.0099999997764825821
    pp = (discrim_t *) 0xdcc58
    #4 0x00012fbc in main (argc=904192, argv=0xdc800) at main.c:171
    spamicity = 1.1168981425207148e-22
    status = RC_NONSPAM
    exitcode = 904192
    (gdb) quit

     
  • Matthias Andree

    Matthias Andree - 2002-11-08

    Logged In: YES
    user_id=2788

    Could you use the attached try.patch and reproduce the
    problem (without gdb). bogofilter should then print
    "assertion ... failed at line #..." -- please post that
    output. Thanks in advance.

     
  • J. Random Hacker

    Logged In: YES
    user_id=517502

    bogofilter.c: In function `compute_spamicity':
    bogofilter.c:553: structure has no member named `stats'

    rm bogofilter.c
    cvs update -A
    make [...]
    Error still reproduces.

    patch bogofilter.c < try.patch
    Looks like a unified context diff.
    Reversed (or previously applied) patch detected! Assume -R
    [yes] no
    Apply anyway? [no] no

    Examination of bogofilter.c shows that everything but the
    pp->stats
    line is already in there.

    In order to exercise the new code I have to run with -v -v
    -v -v.

    Assertion failed: stats_prefix != NULL, file bogofilter.c,
    line 553

     
  • Matthias Andree

    Matthias Andree - 2002-11-08
    • status: open --> open-fixed
     
  • Matthias Andree

    Matthias Andree - 2002-11-08

    Logged In: YES
    user_id=2788

    I hosed it. Anyways, I think it's fixed now in CVS. Please
    do cvs update, recompile, reinstall (if appropriate), test
    again and report back.
    Thank you for your patience and for reporting this problem.

    (removing the broken patch)

     
  • J. Random Hacker

    Logged In: YES
    user_id=517502

    Confirm fixed. Thanks.

     
  • J. Random Hacker

    • status: open-fixed --> closed-fixed
     

Log in to post a comment.