Created attachment 445791 [details] Patch that adds two new tests to the unit test Address.cpp Description of problem: If there is an empty list ([]) in the content of an address (e.g. in the options), the address parser will throw an exception and leak the memory associated with the AddressImpl. Version-Release number of selected component (if applicable): MRG 1.3 Beta How reproducible: 100% Steps to Reproduce: See attached patch to the unit tests. Actual results: Test passes Expected results: Test fails and valgrind issues are identified.
Of course, the actual and expected results are reversed as reported.
Fixed upstream in revision 997771.
Cherry-picked into: mrg_1.3.x ea2768b0063277dc64f2630372cb5ebb1d98365f
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: An empty list in the content of an address (i.e. "[]") causes the address parser to throw an exception. Consequence: An operation (creating a messaging receiver, for example) may fail unnecessarily. Fix: The address parser was fixed so that it can properly parse empty lists. Result: Exceptions are not thrown unnecessarily.
Verified on RHEL( 4.8 | 5.5 ) && ( i386 | x86_64 ) tested with ./spout "queue-empty-map; {create: always,node:{},}" --content "msg" ./spout "queue-empty-list; {create: always,node:{type:queue,x-bindings:[]},}" --content "msg" ; qpid-config queues queue # rpm -qa | grep qpid | sort python-qpid-0.7.946106-14.el5 qpid-cpp-client-0.7.946106-19.el5 qpid-cpp-client-devel-0.7.946106-19.el5 qpid-cpp-client-devel-docs-0.7.946106-19.el5 qpid-cpp-client-ssl-0.7.946106-19.el5 qpid-cpp-mrg-debuginfo-0.7.946106-19.el5 qpid-cpp-server-0.7.946106-19.el5 qpid-cpp-server-cluster-0.7.946106-19.el5 qpid-cpp-server-devel-0.7.946106-19.el5 qpid-cpp-server-ssl-0.7.946106-19.el5 qpid-cpp-server-store-0.7.946106-19.el5 qpid-cpp-server-xml-0.7.946106-19.el5 qpid-java-client-0.7.946106-11.el5 qpid-java-common-0.7.946106-11.el5 qpid-java-example-0.7.946106-11.el5 qpid-tools-0.7.946106-11.el5 --> VERIFIED
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2010-0921.html
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,7 +1 @@ -Cause: An empty list in the content of an address (i.e. "[]") causes the address parser to throw an exception. +An empty list in the content of an address (i.e. []) caused the address parser to throw an exception. This could cause various operations (e.g. creating a messaging receiver) to fail. With this update, the address parser was fixed so that it can properly parse empty lists, thus, the aforementioned exceptions are no longer thrown.- -Consequence: An operation (creating a messaging receiver, for example) may fail unnecessarily. - -Fix: The address parser was fixed so that it can properly parse empty lists. - -Result: Exceptions are not thrown unnecessarily.