[MacPorts] #43662: (GNU) indent -kr crashes
#43662: (GNU) indent -kr crashes --------------------+-------------------------------- Reporter: jhi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: | Port: indent --------------------+-------------------------------- I'm trying to reformat the Perl C source files. The macports gnuindent 2.2.10 seems to crash (as in: segfault) on some files, when I use the -kr option for K&R style. The crash is fully reproducible. I cannot see a correlation between the size of the input file and a crash. I'm attaching one of the crash-inducing files, utf8.c, here for repro. Note: if run as gnuindent -kr utf8.c not only there is a segfault, but the utf8.c gets truncated, too (since by default gnu indent outputs to the input file...) I'm running the latest macports, on OS X 10.9.2. I tried indent in a Ubuntu precise, indent --version says there 2.2.11, no crashes. -- Ticket URL: <https://trac.macports.org/ticket/43662> MacPorts <http://www.macports.org/> Ports system for OS X
#43662: indent: gnuindent -kr crashes ---------------------+-------------------------------- Reporter: jhi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: indent | ---------------------+-------------------------------- Old description:
I'm trying to reformat the Perl C source files. The macports gnuindent 2.2.10 seems to crash (as in: segfault) on some files, when I use the -kr option for K&R style. The crash is fully reproducible. I cannot see a correlation between the size of the input file and a crash. I'm attaching one of the crash-inducing files, utf8.c, here for repro. Note: if run as
gnuindent -kr utf8.c
not only there is a segfault, but the utf8.c gets truncated, too (since by default gnu indent outputs to the input file...)
I'm running the latest macports, on OS X 10.9.2.
I tried indent in a Ubuntu precise, indent --version says there 2.2.11, no crashes.
New description: I'm trying to reformat the Perl C source files. The macports gnuindent 2.2.10 seems to crash (as in: segfault) on some files, when I use the -kr option for K&R style. The crash is fully reproducible. I cannot see a correlation between the size of the input file and a crash. I'm attaching one of the crash-inducing files, utf8.c, here for repro. Note: if run as {{{ gnuindent -kr utf8.c }}} not only there is a segfault, but the utf8.c gets truncated, too (since by default gnu indent outputs to the input file...) I'm running the latest macports, on OS X 10.9.2. I tried indent in a Ubuntu precise, `indent --version` says there 2.2.11, no crashes. -- Comment (by ryandesign@…): The utf8.c you attached is already truncated; I get: {{{ $ gnuindent -kr utf8.c indent: utf8.c:1828: Error:Unexpected end of file }}} -- Ticket URL: <https://trac.macports.org/ticket/43662#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#43662: indent: gnuindent -kr crashes ---------------------+-------------------------------- Reporter: jhi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: indent | ---------------------+-------------------------------- Comment (by ryandesign@…): Replying to [ticket:43662 jhi@…]:
I tried indent in a Ubuntu precise, `indent --version` says there 2.2.11, no crashes.
The latest version of indent on the [http://ftp.gnu.org/gnu/indent/ GNU FTP site] is 2.2.10. You should probably file this bug report with the developers of indent, and when they fix it and release a new version, then we can update the port in MacPorts to that version. -- Ticket URL: <https://trac.macports.org/ticket/43662#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#43662: indent: gnuindent -kr crashes ---------------------+-------------------------------- Reporter: jhi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: indent | ---------------------+-------------------------------- Comment (by jhi@…): Replying to [comment:2 ryandesign@…]:
Replying to [ticket:43662 jhi@…]:
I tried indent in a Ubuntu precise, `indent --version` says there 2.2.11, no crashes.
The latest version of indent on the [http://ftp.gnu.org/gnu/indent/ GNU FTP site] is 2.2.10. You should probably file this bug report with the developers of indent, and when they fix it and release a new version, then we can update the port in MacPorts to that version.
(1) I could try doing that, but looks like the GNU indent hasn't had a release for five years now. I hoped the turnaround time with macports would be shorter. (2) I think what release number the Ubuntu GNU indent is showing is a red herring: what is relevant that with the same input the GNU indent doesn't crash in there, while it does crash in macports. -- Ticket URL: <https://trac.macports.org/ticket/43662#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#43662: indent: gnuindent -kr crashes ---------------------+-------------------------------- Reporter: jhi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: indent | ---------------------+-------------------------------- Comment (by khindenburg@…): {{{ % gnuindent -kr utf8.c -o utf8.output [1] 79051 segmentation fault gnuindent -kr utf8.c -o utf8.output -rw-r--r-- 1 kurthindenburg staff 135K Jun 15 11:26 utf8.c -rw-r--r-- 1 kurthindenburg staff 56K Jun 15 11:26 utf8.output }}} -- Ticket URL: <https://trac.macports.org/ticket/43662#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts