Bug 242276

Summary: lang/pcc: pcc(1) cannot handle missing argument of option
Product: Ports & Packages Reporter: WHR <msl0000023508>
Component: Individual Port(s)Assignee: Joel Dahl <joel>
Status: New ---    
Severity: Affects Only Me CC: msl0000023508
Priority: --- Keywords: buildisok, patch
Version: LatestFlags: bugzilla: maintainer-feedback? (joel)
Hardware: Any   
OS: Any   
Attachments:
Description Flags
lang/pcc/files/patch-cc_cc_cc.c
none
lang.pcc.files.patch-cc_cc_cc.c.diff (svn diff) none

Description WHR 2019-11-28 06:14:05 UTC
Created attachment 209500 [details]
lang/pcc/files/patch-cc_cc_cc.c

For example:

$ pcc -I
Segmentation fault (core dumped)
$ gdb --args pcc -I
GNU gdb (GDB) 8.2 [GDB v8.2 for FreeBSD]
...
(gdb) r
Starting program: /usr/local/bin/pcc -I

Program received signal SIGSEGV, Segmentation fault.
0x28205c1d in strlen () from /lib/libc.so.7
(gdb) bt
#0  0x28205c1d in strlen () from /lib/libc.so.7
#1  0x28127bd0 in strdup () from /lib/libc.so.7
#2  0x0804c3ff in ?? ()
#3  0x0804c0e4 in ?? ()
#4  0x08049b03 in ?? ()
#5  0x08048d6b in ?? ()
#6  0x08048c38 in ?? ()
#7  0x00000000 in ?? ()


The attached patch fix the incorrect comparison of counter 'lac', in function 'nxtopt'; it also changes the loop control statement to prevent accidently lowering 'lac' to an negative value.
The patch was merged with the previous patch for same source file 'cc/cc/cc.c'.
Comment 1 WHR 2019-11-28 06:21:20 UTC
Created attachment 209501 [details]
lang.pcc.files.patch-cc_cc_cc.c.diff (svn diff)

Use a SVN diff file instead.
Comment 2 Automation User 2019-12-13 00:05:09 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/102756764