This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU M4 source repository".
http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=0db7c1504d4bec63381e1bd6385d8a8ded8f309b The branch, master has been updated via 0db7c1504d4bec63381e1bd6385d8a8ded8f309b (commit) from 10c8443af9ee9497b9bb896cfd0475208aefe9fc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0db7c1504d4bec63381e1bd6385d8a8ded8f309b Author: Eric Blake <[EMAIL PROTECTED]> Date: Wed Jul 30 11:23:21 2008 -0600 Fix regression in trace output, introduced 2008-05-08. * m4/input.c (m4__push_symbol): When cloning chains, break pointer back to original chain; latent bug from 2008-02-02 that did not cause misbehavior until trace output read unfinished chain. * tests/builtins.at (debug): Add test for this. Signed-off-by: Eric Blake <[EMAIL PROTECTED]> ----------------------------------------------------------------------- Summary of changes: ChangeLog | 8 ++++++++ m4/input.c | 1 + tests/builtins.at | 13 +++++++++++++ 3 files changed, 22 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2eb684e..55843b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-07-30 Eric Blake <[EMAIL PROTECTED]> + + Fix regression in trace output, introduced 2008-05-08. + * m4/input.c (m4__push_symbol): When cloning chains, break pointer + back to original chain; latent bug from 2008-02-02 that did not + cause misbehavior until trace output read unfinished chain. + * tests/builtins.at (debug): Add test for this. + 2008-07-28 Eric Blake <[EMAIL PROTECTED]> Optimize iteration examples. diff --git a/m4/input.c b/m4/input.c index 4306613..de4a175 100644 --- a/m4/input.c +++ b/m4/input.c @@ -592,6 +592,7 @@ m4__push_symbol (m4 *context, m4_symbol_value *value, size_t level, bool inuse) destructively modifies the chain it is parsing. */ chain = (m4__symbol_chain *) obstack_copy (current_input, src_chain, sizeof *chain); + chain->next = NULL; if (chain->type == M4__CHAIN_STR && chain->u.u_s.level == SIZE_MAX) { if (chain->u.u_s.len <= INPUT_INLINE_THRESHOLD || !inuse) diff --git a/tests/builtins.at b/tests/builtins.at index 198a25d..fe7b0ca 100644 --- a/tests/builtins.at +++ b/tests/builtins.at @@ -174,6 +174,19 @@ m4trace: -1- countdown(`0') -> `0 ifelse(eval(0 > 0), 1, `countdown(decr(0))', ` AT_CHECK_M4([debug.m4], 0, expout, experr) +dnl Test a regression introduced 2008-05-08, fixed 2008-07-30. +AT_DATA([debug.m4], [[debugmode(`e')traceon(`ifelse')dnl +define(`e', `ifelse(`$1', `$2', `ifelse(`$1', `$2', `e(shift($@))')', `$2')') +e(`1', `1', `a') +]]) + +AT_CHECK_M4([debug.m4], [0], [[ +a +]], [[m4trace: -1- ifelse -> ifelse(`1', `1', `e(shift(`1',`1',`a'))') +m4trace: -1- ifelse -> e(shift(`1',`1',`a')) +m4trace: -1- ifelse -> a +]]) + AT_CLEANUP hooks/post-receive -- GNU M4 source repository
