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

bugzilla at busybox.net bugzilla at busybox.net
Sat Jun 19 15:46:40 UTC 2010


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

--- Comment #5 from Denys Vlasenko <vda.linux at googlemail.com>  ---
Apparently here we somehow get fp == NULL

                FILE *fp = G.input_file_list[G.current_input_file];
                /* Read line up to a newline or NUL byte, inclusive,
                 * return malloc'ed char[]. length of the chunk read
                 * is stored in len. NULL if EOF/error */
                temp = bb_get_chunk_from_file(fp, &len);

Can you add

bb_error_msg("input_file_list[%d]:%p", G.current_input_file, fp)

just after FILE *fp = ... assignment?

Also, find this line:

G.input_file_list[G.input_file_count++] = file;

and add 

bb_error_msg("storing input_file_list[%d]=%p",
      G.input_file_count - 1, file);

after it.

Rebuild, let it crash, and post the output.

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