* [PATCH] Fix regression introduced by 6c659fc2c7cd2da6d2b9a3d7c38597ad3821832a
@ 2014-11-29 18:08 Siva Chandra
2014-11-29 21:28 ` Ulrich Weigand
0 siblings, 1 reply; 3+ messages in thread
From: Siva Chandra @ 2014-11-29 18:08 UTC (permalink / raw)
To: gdb-patches; +Cc: Ulrich Weigand, Jan Kratochvil
[-- Attachment #1: Type: text/plain, Size: 814 bytes --]
The regression was pointed out here:
https://sourceware.org/ml/gdb-patches/2014-11/msg00728.html
It was introduced by my patch which was pushed as
6c659fc2c7cd2da6d2b9a3d7c38597ad3821832a. What my patch did was to
make evaluate_subexp non re-entrant. As in, if evaluate_subexp is
called with *pos == 0 while a top level expression is under
evaluation, then it will crash with symptoms similar to those reported
above. The attached patch fixes this problem and hence the regression.
Jan Kratochvil has kindly tested it for me and confirmed that it
indeed fixes the regression and does not introduce any new ones.
gdb/ChangeLog:
2014-11-29 Siva Chandra Reddy <sivachandra@google.com>
* eval.c (evaluate_subexp): Check that thread stack temporaries
are not already enabled before enabling them.
[-- Attachment #2: fix_regression_v1.txt --]
[-- Type: text/plain, Size: 539 bytes --]
diff --git a/gdb/eval.c b/gdb/eval.c
index a13793c..c2ab879 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -69,7 +69,8 @@ evaluate_subexp (struct type *expect_type, struct expression *exp,
int cleanup_temps = 0;
if (*pos == 0 && target_has_execution
- && exp->language_defn->la_language == language_cplus)
+ && exp->language_defn->la_language == language_cplus
+ && !thread_stack_temporaries_enabled_p (inferior_ptid))
{
cleanups = enable_thread_stack_temporaries (inferior_ptid);
cleanup_temps = 1;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-29 23:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-29 18:08 [PATCH] Fix regression introduced by 6c659fc2c7cd2da6d2b9a3d7c38597ad3821832a Siva Chandra
2014-11-29 21:28 ` Ulrich Weigand
2014-11-29 23:52 ` Siva Chandra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox