re PR preprocessor/8055 (PATCH: cpp0 dies with SIG11 when building FreeBSD kernel)

2002-09-27  Alexander N. Kabaev <ak03@gte.com>

	PR preprocessor/8055
	* cppmacro.c (stringify_arg): Do not overflow the buffer
	with the terminating NUL when the argument to be stringified
	has no tokens.
	* gcc.dg/cpp/20020927-1.c: New.

From-SVN: r57601
This commit is contained in:
Zack Weinberg 2002-09-28 00:32:16 +00:00
parent 46709fe1ad
commit d2603a9647
4 changed files with 36 additions and 15 deletions

View File

@ -1,3 +1,10 @@
2002-09-27 Alexander N. Kabaev <ak03@gte.com>
PR preprocessor/8055
* cppmacro.c (stringify_arg): Do not overflow the buffer
with the terminating NUL when the argument to be stringified
has no tokens.
2002-09-26 David S. Miller <davem@redhat.com>
PR optimization/7335
@ -60,7 +67,7 @@
2002-09-16 Jeff Law <law@redhat.com>
* libgcc2.c: Do not include machmode.h.
* libgcc2.c: Do not include machmode.h.
2002-09-16 Jason Merrill <jason@redhat.com>
Danny Smith <dannysmith@users.sourceforge.net>
@ -256,7 +263,7 @@
2002-08-27 Mark Mitchell <mark@codesourcery.com>
* doc/invoke.texi: Document -Wabi.
2002-08-23 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (rs6000_select_section): Treat
@ -272,7 +279,7 @@
* explow.c (expr_size): Call it.
(int_expr_size): New fn.
* expr.h: Declare it.
* expr.c (expand_expr) [CONSTRUCTOR]: Use it to calculate how
* expr.c (expand_expr) [CONSTRUCTOR]: Use it to calculate how
much to store.
2002-08-23 Alan Modra <amodra@bigpond.net.au>

View File

@ -348,6 +348,12 @@ stringify_arg (pfile, arg)
}
/* Commit the memory, including NUL, and return the token. */
if ((size_t) (BUFF_LIMIT (pfile->u_buff) - dest) < 1)
{
size_t len_so_far = dest - BUFF_FRONT (pfile->u_buff);
_cpp_extend_buff (pfile, &pfile->u_buff, 1);
dest = BUFF_FRONT (pfile->u_buff) + len_so_far;
}
len = dest - BUFF_FRONT (pfile->u_buff);
BUFF_FRONT (pfile->u_buff) = dest + 1;
return new_string_token (pfile, dest - len, len);

View File

@ -1,8 +1,13 @@
2002-09-27 Zack Weinberg <zack@codesourcery.com>
* gcc.dg/cpp/20020927-1.c: New.
2002-09-26 David S. Miller <davem@redhat.com>
* gcc.c-torture/compile/trunctfdf.c: New.
2002-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lib/target-supports.exp (check_weak_available): Handle solaris2.
2002-09-27 Alan Modra <amodra@bigpond.net.au>
@ -37,7 +42,7 @@
* testsuite/g++.dg/abi/bitfield5.C: New test.
* testsuite/g++.dg/abi/vbase10.C: Likewise.
2002-08-15 Neil Booth <neil@daikokuya.co.uk>
* gcc.dg/cpp/_Pragma3.c, gcc.dg/cpp/vararg3.c, gcc.dg/cpp/vararg4.c:
@ -92,7 +97,7 @@
PR c++/7224
* g++.dg/overload/error1.C: New test.
2002-07-03 Mark Mitchell <mark@codesourcery.com>
PR c++/6706
@ -602,8 +607,8 @@
2002-03-26 Richard Henderson <rth@redhat.com>
* gcc.c-torture/execute/20020307-2.c (main): Pass a variable sized
structure.
* gcc.c-torture/execute/20020307-2.c (main): Pass a variable sized
structure.
2002-03-26 David Billinghurst <David.Billinghurst@riotinto.com>
@ -853,7 +858,7 @@ Sat Mar 9 07:30:53 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2002-02-21 Aldy Hernandez <aldyh@redhat.com>
* gcc.dg/attr-alwaysinline.c: New.
* gcc.dg/attr-alwaysinline.c: New.
2002-02-21 Jakub Jelinek <jakub@redhat.com>
@ -930,7 +935,7 @@ Sat Mar 9 07:30:53 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2002-02-13 Stan Shebs <shebs@apple.com>
* gcc.dg/altivec-3.c: New.
* gcc.dg/altivec-3.c: New.
2002-02-12 Jakub Jelinek <jakub@redhat.com>
@ -1036,13 +1041,13 @@ Sat Mar 9 07:30:53 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
* g++.dg/ext/align1.C: Do not use an explicit alignment value
as certain file formats cannot support particularly large
alignments.
as certain file formats cannot support particularly large
alignments.
* g++.dg/warn/weak1.C: Expect a warning from COFF toolchains,
and do not expect to be able to link the executable.
* g++.old-deja/g++.ext/attrib5.C: Expect the compilation to
* g++.old-deja/g++.ext/attrib5.C: Expect the compilation to
fail because the COFF format does not support the weak attribute.
2002-02-05 David Billinghurst <David.Billinghurst@riotinto.com>
@ -1051,8 +1056,8 @@ Sat Mar 9 07:30:53 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2002-02-05 Aldy Hernandez <aldyh@redhat.com>
* gcc.dg/altivec-4.c: AltiVec builtin predicates changed format.
Fix testcase accordingly.
* gcc.dg/altivec-4.c: AltiVec builtin predicates changed format.
Fix testcase accordingly.
2002-02-04 Richard Henderson <rth@redhat.com>

View File

@ -60,7 +60,10 @@ S(1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890123456789012345)
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890123)
/* When stringify_arg() was called with an empty macro argument, it would
advance the buffer pointer by one but fail to check for running past the