preprocessor/9465: tradcpp0 segfaults on nul bytes
Neil Booth
neil@daikokuya.co.uk
Mon Jan 27 22:18:00 GMT 2003
Alexandre Duret-Lutz wrote:-
> >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)
Jakub, this is the second report of this regression you introduced.
Do you intend to fix it?
Neil.
More information about the Gcc-bugs
mailing list