This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
preprocessor/9465: tradcpp0 segfaults on nul bytes
- From: Alexandre Duret-Lutz <adl at gnu dot org>
- To: gcc-gnats at gcc dot gnu dot org
- Date: 27 Jan 2003 20:37:07 -0000
- Subject: preprocessor/9465: tradcpp0 segfaults on nul bytes
- Reply-to: Alexandre Duret-Lutz <adl at gnu dot org>
>Number: 9465
>Category: preprocessor
>Synopsis: tradcpp0 segfaults on nul bytes
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jan 27 20:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Alexandre Duret-Lutz
>Release: cpp (GCC) 3.2.2 20030124 (Debian prerelease)
>Organization:
>Environment:
Debian unstable
>Description:
`tradcpp0' segfaults on nul bytes.
When Debian switched to gcc-3.2 my applications' X resources
stopped being honored. It turns out that `xrdb' processes
its input with `cpp -traditional' and I had a useless nul byte
at the end of my .Xresources.
I can reproduce this segfault with 3.1. It works fine with 2.95.
>How-To-Repeat:
Create a file containing a nul byte, and run it through
the traditional preproc.
% echo '\0' > bar
% od -c bar
0000000 \0 \n
0000002
~ % cpp bar
# 1 "bar"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "bar"
bar:1:1: warning: null character(s) ignored
~ % cpp -traditional bar
cpp: Internal error: Segmentation fault (program tradcpp0)
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
For Debian GNU/Linux specific bugs,
please see /usr/share/doc/debian/bug-reporting.txt.
~ % cpp --version
cpp (GCC) 3.2.2 20030124 (Debian prerelease)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: