Discussion:
[bdbxml] peculiar behavior in modification
George Feinberg
2006-04-18 14:07:36 UTC
Permalink
For the benefit of the list, this turned out to be a bug
in BDB XML that can occur if a single XmlModify::execute()
call has steps that both remove and add an attribute to the
same node. The symptom is a double-delete of memory
that can lead to a crash, depending on your platform.

If anyone thinks they have this problem, the fix is a simple,
one-line change.

Regards,

George
greetings;
We have been testing DBXML with PHP for quite some time. We noticed
the following behavior that
Given a simple xml doc with ONE attribute only ( e.g., <x
id="1" />) we can do
1) addRemoveStep
2) addAppendStep
on attribute "id" with one "modify" object.
However, as soon as the doc has more than one attributes (e.g.,
<y id="1" id2="99" />)
the modify()->execute() function crashes during the removal and
appeding operations.
It took us a while to track the probelm to this level. I hope you
can follow it up further.
I am including two samples programs that can produce the above
outcomes.
program "x.php" works w/ ONE attribute , and program "y.php"
works w/ TWO attributes, otherwise they are identicial in logic.
regards,
/Farhad
------------------------------------------
To remove yourself from this list, send an
email to xml-unsubscribe-***@public.gmane.org

Loading...