From 5cf6e669af1b6133e1ec8cb66a5bd5754ee437c2 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 15 Nov 2013 09:43:01 +0100 Subject: tests: check $$'s destruction with variant, YYERROR, and no error recovery When variant are enabled, the yylhs variable (the left-hand side of the rule being reduced, i.e. $$ and @$) is explicitly destroyed when YYERROR is called. This is because before running the user code, $$ is initialized, so that the user can properly use it. However, when quitting yyparse, yylhs is also reclaimed by the C++ compiler: the variable goes out of scope. This was not detected by the test suite because (i) the Object tracker was too weak, and (ii) the problem does not show when there is error recovery. Reported by Paolo Simone Gasparello. * tests/c++.at (Exception safety): Improve the objects logger to make sure that we never destroy twice an object. Also track copy-constructors. Use a set instead of a list. Display the logs before running the function body, this is more useful in case of failure. Generalize to track with and without error recovery. --- THANKS | 1 + 1 file changed, 1 insertion(+) (limited to 'THANKS') diff --git a/THANKS b/THANKS index 9b7a8963..ebadb447 100644 --- a/THANKS +++ b/THANKS @@ -96,6 +96,7 @@ Odd Arild Olsen oao@fibula.no Oleg Smolsky oleg.smolsky@pacific-simulators.co.nz Oleksii Taran oleksii.taran@gmail.com Paolo Bonzini bonzini@gnu.org +Paolo Simone Gasparello djgaspa@gmail.com Pascal Bart pascal.bart@epita.fr Paul Eggert eggert@cs.ucla.edu Paul Hilfinger Hilfinger@CS.Berkeley.EDU -- cgit v1.2.1