pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42951: pcc freezes on compile if closing quotes are missing from printf(3)



>Number:         42951
>Category:       pkg
>Synopsis:       pcc freezes on compile if closing quotes are missing from 
>printf(3)
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 10 22:30:01 +0000 2010
>Originator:     Christopher Berardi
>Release:        NetBSD 5.0.2
>Organization:
>Environment:
NetBSD natoufa.dnsalias.net 5.0.2 NetBSD 5.0.2 (GENERIC) #0: Sat Feb  6 
17:53:27 UTC 2010  
builds%b7.netbsd.org@localhost:/home/builds/ab/netbsd-5-0-2-RELEASE/i386/201002061851Z-obj/home/builds/ab/netbsd-5-0-2-RELEASE/src/sys/arch/i386/compile/GENERIC
 i386

>Description:
On compiling a .c file, if the closing quotes from the first argument of 
printf(3) are missing, pcc will freeze on compilation. It should exit with an 
error message (like gcc does).

As this is a potentially common typo, and I'd imagine it affects other 
functions that take a string argument, this is a serious problem (especially if 
you don't know where this is coming from)! 
>How-To-Repeat:
test.c:

#include <stdio.h>

int main()
{
        /* notice the missing second " */
        printf("hello, world\n);

        return 0;
}


$ pcc test.c
>Fix:



Home | Main Index | Thread Index | Old Index