[Bug 2041] [1.16.2] "sed" segmentation fault

bugzilla at busybox.net bugzilla at busybox.net
Fri Jun 18 02:40:59 UTC 2010


https://bugs.busybox.net/show_bug.cgi?id=2041

--- Comment #4 from my.somewhat.lengthy.loginname at gmail.com  ---
(In reply to comment #3)

> Please run it under ulimit -c 999999999, load the coredump into gdb, produce
> backtrace and see where that fgetc comes from. Post the backtrace here.

root [/tmp/busybox-1.16.2] ./busybox_unstripped ash
root [/tmp/busybox-1.16.2] ./busybox_unstripped echo 1234 |
./busybox_unstripped sed 's/23//'
Segmentation fault (core dumped)
root [/tmp/busybox-1.16.2] gdb ./busybox_unstripped -c core
GNU gdb (GDB) 7.1
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/busybox-1.16.2/busybox_unstripped...done.

warning: core file may not match specified executable file.
[New Thread 5983]
Core was generated by `./busybox_unstripped sed s/23//'.
Program terminated with signal 11, Segmentation fault.
#0  0x08061e09 in getc ()
(gdb) bt
#0  0x08061e09 in getc ()
#1  0x081742f0 in bb_get_chunk_with_continuation (file=0x0, end=0xbfae8758,
lineno=0x0)
    at libbb/get_line_from_file.c:34
#2  0x0816aed1 in get_next_line (
    gets_char=0xbfae879e "\034\nx\364\034\b@\211\256\277 \210\256\277") at
editors/sed.c:769
#3  0x0816b00b in process_files () at editors/sed.c:873
#4  0x0816ba1c in sed_main (argc=2, argv=0xbfae8940) at editors/sed.c:1323
#5  0x080fe982 in run_applet_no_and_exit (applet_no=220, argv=0xbfae8938) at
libbb/appletlib.c:746
#6  0x080fe9a3 in run_applet_and_exit (name=0xbfae8f11 "sed", argv=0xbfae8938)
    at libbb/appletlib.c:753
#7  0x080feb90 in busybox_main (name=<value optimized out>, argv=0xbfae8934)
    at libbb/appletlib.c:718
#8  run_applet_and_exit (name=<value optimized out>, argv=0xbfae8934) at
libbb/appletlib.c:755
#9  0x080fec14 in main (argc=3, argv=0xbfae8934) at libbb/appletlib.c:808
(gdb)

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list