]> git.saurik.com Git - bison.git/blobdiff - ChangeLog
named references: fix double free.
[bison.git] / ChangeLog
index 26a34cf93536a768852bdf3035005fa88aed5e08..a3d120215cef52513e96df7388ee038be3d5ff8a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2011-03-09  Akim Demaille  <akim@lrde.epita.fr>
+
+       named references: fix double free.
+       In `rhs[name]: "a" | "b"', do not free "name" twice.
+       Reported by Tys Lefering.
+       <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
+       * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
+       * src/parse-gram.y (current_lhs): Rename as...
+       (current_lhs_symbol): this.
+       (current_lhs): New function.  Use it to free the current lhs
+       named reference.
+       * src/reader.c: Bind lhs to a copy of the current named reference.
+       * src/symlist.c: Rely on free (0) being valid.
+       * tests/named-refs.at: Test this.
+
 2011-03-09  Akim Demaille  <akim@lrde.epita.fr>
 
        tests: style changes.