summaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorAkim Demaille <demaille@gostai.com>2011-03-09 21:10:35 +0100
committerAkim Demaille <demaille@gostai.com>2011-03-09 21:10:35 +0100
commita4d1bf6a9cdd337fc113c5a3fc7424e7491d6ea5 (patch)
tree0dda502bac89f9cbff055073d1bd2df99be6479d /ChangeLog
parent17d7bf83d02e2272c54d3486075091156d5d649f (diff)
downloadbison-a4d1bf6a9cdd337fc113c5a3fc7424e7491d6ea5.tar.gz
named references: fix double free.candidates/named-ref-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. (cherry picked from commit 8f462efe923947cc4e72deea5b0fa93a5f88000d) Conflicts: src/parse-gram.y
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog15
1 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 26a34cf9..a3d12021 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
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.
* tests/named-refs.at (Redundant words in LHS brackets)
(Unresolved references): here.