[Bug 242276] lang/pcc: pcc(1) cannot handle missing argument of option

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Nov 28 06:14:06 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242276

            Bug ID: 242276
           Summary: lang/pcc: pcc(1) cannot handle missing argument of
                    option
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: joel at FreeBSD.org
          Reporter: msl0000023508 at gmail.com
          Assignee: joel at FreeBSD.org
             Flags: maintainer-feedback?(joel at FreeBSD.org)
 Attachment #209500 text/plain
         mime type:

Created attachment 209500
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=209500&action=edit
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'.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list