Commit 40ed1205 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

parsetl: fix crash in debug-mode

Fixes #193, reported by Etienne Renault.

* spot/parsetl/parsetl.yy: Clone printed formulas.
* tests/core/parse.test: Add test case.
* NEWS: Mention the issue.
parent a5fb5784
......@@ -31,6 +31,8 @@ New in spot 2.1.2.dev (not yet released)
* str_sere() and str_utf8_sere() were not returning the same
string that print_sere() and print_utf8_sere() would print.
* Running the LTL parser in debug-mode would crash.
New in spot 2.1.2 (2016-10-14)
Command-line tools:
......
......@@ -236,8 +236,8 @@ using namespace spot;
%destructor { $$->destroy(); } <ltl>
%printer { debug_stream() << *$$; } <str>
%printer { print_psl(debug_stream(), formula($$)); } <ltl>
%printer { print_sere(debug_stream(), formula($$)); } sere bracedsere
%printer { print_psl(debug_stream(), formula($$->clone())); } <ltl>
%printer { print_sere(debug_stream(), formula($$->clone())); } sere bracedsere
%printer { debug_stream() << $$; } <num>
%printer { debug_stream() << $$.min << ".." << $$.max; } <minmax>
......
#! /bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2009, 2010, 2011, 2012, 2013 Laboratoire de Recherche
# et Développement de l'Epita (LRDE).
# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2016 Laboratoire de
# Recherche et Développement de l'Epita (LRDE).
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
# et Marie Curie.
......@@ -104,3 +104,6 @@ do
fi
fi
done
# Make sure running the parser in debug mode does not crash
run 0 ../ikwiad -d 'a U b'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment