[augeas-devel] [Augeas] #180: Segmentation fault with recursive lens
Augeas
trac at fedorahosted.org
Wed Feb 16 04:50:15 UTC 2011
#180: Segmentation fault with recursive lens
-------------------------+--------------------------------------------------
Reporter: fgiraldeau | Owner: lutter
Type: defect | Status: closed
Priority: major | Milestone: next
Component: Augeas | Version: 0.7.4
Resolution: fixed | Keywords:
-------------------------+--------------------------------------------------
Changes (by fgiraldeau):
* status: assigned => closed
* resolution: => fixed
Comment:
commit 0e1f3b81cc12bf3ab14ad9e8b9402e14e1e198ed
Author: Francis Giraldeau <francis.giraldeau at gmail.com>
Date: Wed Feb 9 23:54:05 2011 -0500
Fix segfault in get.c with L_MAYBE lens (bug#180)
When a L_MAYBE lens was the last child of a L_CONCAT inside a
L_SUBTREE, the
the match in visit_exit top_frame(rec_state)->lens == lens->child was
true,
causing combine of a frame when it shouldn't. This test is true
because ther
is no other lens following in the concat in this special case, hence
the top
frame matched the child of the L_MAYBE.
To avoid this special case, we propose to push L_MAYBE lens on the
frames
stack. If L_MAYBE is encountered in visit_exit, we pop at least one
frame an
two if the child match. This way, the stack is always valid.
Closes trac ticket #180.
--
Ticket URL: <https://fedorahosted.org/augeas/ticket/180#comment:2>
Augeas <http://augeas.net/>
a configuration API
More information about the augeas-devel
mailing list