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

bugzilla at busybox.net bugzilla at busybox.net
Sun Jun 20 01:55:38 UTC 2010


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

--- Comment #10 from Denys Vlasenko <vda.linux at googlemail.com>  ---
(In reply to comment #9)
and here is a functional replacement that I made, enriched with console
> messages:
> 
> static void add_input_file(FILE *file)
> {
>     bb_error_msg("file: %p", file);
> 
>     G.input_file_list = xrealloc_vector(G.input_file_list, 2,
> G.input_file_count);
>     G.input_file_list[G.input_file_count] = file;
> 
>     bb_error_msg("G.input_file_list[G.input_file_count]: %p",
> G.input_file_list[G.input_file_count]);
>     bb_error_msg("G.input_file_list[G.input_file_count]: %p",
> G.input_file_list[G.input_file_count]);
> 
>     G.input_file_count++;
> }
> 
> The replacement function checks, *twice* in a row, whether the file pointer was
> correctly stored. The result is:
> 
> root [/tmp/busybox-1.16.2] ./busybox_unstripped echo 1234 |
> ./busybox_unstripped sed 's/23//'
> sed: file: 0x81cc3c0
> sed: G.input_file_list[G.input_file_count]: 0x81cc3c0
> sed: G.input_file_list[G.input_file_count]: (nil)
> Segmentation fault

Looks like gcc bug. Let's see the assembly. Please run

objdymp -drsx editors/sed.o >sed.disasm

on a modified file (one with your debug printouts) and attach sed.disasm to
this bug.

and attach sed.disasm

-- 
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