Description of problem: Cproto segfaults when reading from stdin. Version-Release number of selected component (if applicable): Name : cproto Arch : x86_64 Version: 4.7e Release: 2.fc6 How reproducible: Every time. Steps to Reproduce: 1. Run the following command: $ echo "#include <stdio.h> int main(int argc, char *argv[]) { printf(\"hello world\n\"); }" | cproto Additional info: - I have not yet tested this on my i386 laptop, only on my x86_64 workstation. - This works just fine: $ echo "#include <stdio.h> int main(int argc, char *argv[]) { printf(\"hello world\n\"); }" >hello.c; cproto hello.c - gdb backtrace: Program received signal SIGSEGV, Segmentation fault. 0x0000000000407439 in get_cpp_directive (copy=1) at ./lex.l:726 726 *temp_buf = '\0'; (gdb) backtrace #0 0x0000000000407439 in get_cpp_directive (copy=1) at ./lex.l:726 #1 0x00000000004080c3 in yylex () at ./lex.l:175 #2 0x0000000000409709 in yyparse () at y.tab.c:877 #3 0x000000000040acdb in process_file (infile=<value optimized out>, name=0x40b65d "stdin") at ./grammar.y:1011 #4 0x0000000000402348 in main (argc=1, argv=0x7fff97c14078) at cproto.c:821 #5 0x000000373681dab4 in __libc_start_main (main=0x401910 <main>, argc=1, ubp_av=0x7fff97c14078, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fff97c14068) at libc-start.c:222 #6 0x00000000004012c9 in _start ()
Fixed in rawhide, thanks for noticing. BTW. this happens exclusively for the #include directive. The example code isn't compilable anyway ;-)
I added a fix in 4.7f
I confirm that the problem is gone in 4.7f.
Ok, I'll release fedora updates then. Thanks!
cproto-4.7f-1.fc8 has been submitted as an update for Fedora 8
cproto-4.7f-1.fc7 has been submitted as an update for Fedora 7
cproto-4.7f-1.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.
cproto-4.7f-1.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.