destringize_and_run forgets to initialize all the fields of the cpp_context that it pushes. Later _cpp_pop_context then gets confused when it accesses context->tokens_kind via the call to macro_of_context on context->prev. The first hunk of this patch is the real obvious fix. The second hunk is just an assert that I am adding to err on the safe side. Tested by on x86_64-unknown-linux-gnu against trunk by running the test gcc.dg/gomp/macro-4.c under Valgrind, and bootstrapped. libcpp/ * directives.c (destringize_and_run): Properly initialize the new context. * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop the initial base context, which has the same life time as the current instance of cpp_file. From-SVN: r187054
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
include | Loading commit data... | |
po | Loading commit data... | |
ChangeLog | Loading commit data... | |
Makefile.in | Loading commit data... | |
aclocal.m4 | Loading commit data... | |
charset.c | Loading commit data... | |
config.in | Loading commit data... | |
configure | Loading commit data... | |
configure.ac | Loading commit data... | |
directives-only.c | Loading commit data... | |
directives.c | Loading commit data... | |
errors.c | Loading commit data... | |
expr.c | Loading commit data... | |
files.c | Loading commit data... | |
identifiers.c | Loading commit data... | |
init.c | Loading commit data... | |
internal.h | Loading commit data... | |
lex.c | Loading commit data... | |
line-map.c | Loading commit data... | |
macro.c | Loading commit data... | |
makeucnid.c | Loading commit data... | |
mkdeps.c | Loading commit data... | |
pch.c | Loading commit data... | |
symtab.c | Loading commit data... | |
system.h | Loading commit data... | |
traditional.c | Loading commit data... | |
ucnid.h | Loading commit data... | |
ucnid.tab | Loading commit data... |