Menu

#126 opannotate 0.8.2cvs (12/30/04) segfaults

closed-fixed
None
5
2005-03-19
2004-12-30
Dan Hollis
No

opannotate 0.8.2cvs (12/30/04) segfaults.

redhat 7.3
glibc2.2.5
gcc 2.96-113
binutils 2.15.90 (BFD_VERSION_DATE 20040517)

$ opannotate -v
opannotate: oprofile 0.8.2cvs compiled on Dec 30 2004
00:30:02

$ ldd /usr/local/bin/opannotate
libpopt.so.0 => /usr/lib/libpopt.so.0 (0xb7fcd000)
libdl.so.2 => /lib/libdl.so.2 (0xb7fc9000)
libstdc++-libc6.2-2.so.3 =>
/usr/lib/libstdc++-libc6.2-2.so.3 (0xb7f86000)
libm.so.6 => /lib/libm.so.6 (0xb7f65000)
libc.so.6 => /lib/libc.so.6 (0xb7e3e000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2
(0xb7fee000)

# opannotate -s
/usr/local/games/enemy-territory/et.x86.new
warning: /dev/zero is not in a usable binary format.
warning: "/usr/local/games/enemy-territory/et.x86.new"
some functions compiled without debug information may
have incorrect source line attributions
/*
* Command line: opannotate -s
/usr/local/games/enemy-territory/et.x86.new
*
* Interpretation of command line:
* Output annotated source file with samples
* Output all files
*
Segmentation fault (core dumped)

(gdb) bt
#0 0xb7eaf888 in _IO_default_uflow_internal () from
/lib/libc.so.6
#1 0xb7fb0b7b in streambuf::uflow () from
/usr/lib/libstdc++-libc6.2-2.so.3
#2 0xb7eaec2b in __uflow () from /lib/libc.so.6
#3 0xb7eaa76f in getc () from /lib/libc.so.6
#4 0x08056ce3 in istream & getline<char,
string_char_traits<char>,
__default_alloc_template<true, 0> > (
is=@0xbffff6b0, s=@0xbffff5f0, delim=10 '\n') at
/usr/include/g++-3/streambuf.h:396
#5 0x0804d64b in {anonymous}::output_info
(out=@0x814c890) at /usr/include/g++-3/streambuf.h:222
#6 0x08054e49 in {anonymous}::output_source
(filter=@0x814c954) at opannotate.cpp:586
#7 0x08055709 in {anonymous}::annotate_source
(images=@0xbffff900) at opannotate.cpp:662
#8 0x08055a90 in {anonymous}::opannotate
(non_options=@0xbffff960) at opannotate.cpp:701
#9 0x080608b8 in run_pp_tool (argc=3, argv=0xbffffa64,
fct=0x805580c
<{anonymous}::opannotate(vector<basic_string<char,
string_char_traits<char>,
__default_alloc_template<true, 0> >,
allocator<basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> > > > const &)>) at
common_option.cpp:107
#10 0x08055efe in main (argc=3, argv=0xbffffa64) at
opannotate.cpp:715
#11 0xb7e551c4 in __libc_start_main () from /lib/libc.so.6

Discussion

  • Philippe Elie

    Philippe Elie - 2004-12-30

    Logged In: YES
    user_id=318973

    I can't reproduce it.

    The segfault seems to occur at a point where no segfault can
    occur
    pp/opannotte.cpp:138

    string line;
    while (getline(ss, line)) { <------
    out << in_comment << line << '\n';
    }

    It can be
    1) a bug elsewhere causing memory corruption showed later in
    the run
    2) a compiler problem (I must admit I'm not confident in RH
    gcc 2.96)
    3) something else I miss :)

    anyway the faulting portion of code is unecessary
    complicated, try the
    attached which simplify it.

    If it's a compiler problem it's likely to go away with this
    patch, you
    can also try another gcc version to check that.

    regards,
    Phil

     
  • Philippe Elie

    Philippe Elie - 2004-12-30

    apologies, ignore the previous patch, it contains a bunch of unrelated things...

     
  • Philippe Elie

    Philippe Elie - 2004-12-30

    Logged In: YES
    user_id=318973

    Please ignore the first patch, it contains a lot of
    unrelated things...

     
  • Dan Hollis

    Dan Hollis - 2004-12-31

    Logged In: YES
    user_id=106082

    patch seems to have fixed the problem

     
  • Philippe Elie

    Philippe Elie - 2005-01-03
    • status: open --> open-fixed
     
  • Dan Hollis

    Dan Hollis - 2005-02-25

    Logged In: YES
    user_id=106082

    this bug can be closed now imo
    time for a oprofile 0.3.9 release? :)

     
  • Philippe Elie

    Philippe Elie - 2005-03-19
    • assigned_to: nobody --> phil_e
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB