This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
cpp crashes after "macro used with just one arg"
- To: gcc-bugs at gcc dot gnu dot org
- Subject: cpp crashes after "macro used with just one arg"
- From: Robert Bihlmeyer <robbe at orcus dot priv dot at>
- Date: 26 Aug 1999 21:20:28 +0200
Hi,
this is the cpp included with gcc-2.95 on i586-linux-2.2.10 (glibc
2.1.1). When fed this program
#define TEST(F,E) do { printf("%s = %" #F "\n", #E, E) } while(0)
int main()
{
TEST(unsetenv);
}
cpp outputs
cpp-test.c:5: macro `TEST' used with just one arg
and then crashes with a SIGSEGV.
gdb neither delivered a sensible backtrace (only that the crash
occured in chunk_free (libc?)), nor did the crash occur when stepping
through the code. If gdb is not used, the bug is completely
reproducible here.
I suspect memory corruption somewhere, perhaps near the error handling.
Robbe
--
Robert Bihlmeyer reads: Deutsch, English, MIME, Latin-1, NO SPAM!
<robbe@orcus.priv.at> <http://stud2.tuwien.ac.at/~e9426626/sig.html>