Bug 884036
| Summary: | testConversionsFromString c++ unit test failing | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise MRG | Reporter: | Petr Matousek <pematous> | |
| Component: | qpid-cpp | Assignee: | mick <mgoulish> | |
| Status: | CLOSED ERRATA | QA Contact: | Petr Matousek <pematous> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | Development | CC: | jross, lzhaldyb, mcressma | |
| Target Milestone: | 2.3 | Keywords: | Regression | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | qpid-cpp-0.18-14 | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: Bug in older GCC libraries
Consequence: Attempt to cast negative-zero to an unsigned type would fail
Fix: Rearrange the casting logic to handle the "minus" sign separately.
Result: negative-zero now works properly on older and newer GCC libs. Other values are unaffected.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 905661 (view as bug list) | Environment: | ||
| Last Closed: | 2013-03-06 18:53:07 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 905661 | |||
Petr, is it fair to label this one a regression? Yes, I think so. Keyword updated. fixed in branch 0.18-mrg-mick-884036 negative-0 would not happily cast to an unsigned type, so I tested for that case and cast a positive 0. This issue has been fixed. Verified on rhel5.9 and rhel6.3 (x86_64, i386) packages used for testing: qpid-cpp-*-0.18-13 -> VERIFIED I know we verified this already, but yesterday I did something like the same fix in trunk and Andrew pointed out that it was 1. evil, and 2. wrong. Then he wrote a much nicer fix that was 1. good, and 2. correct. I checked *that* fix into trunk. Could we reopen this BZ somehow, so I could use his fix in place of my evil hack ? As per request from the development, changing this back to ASSIGNED. Mick, any update? pushed as branch 0.18-mrg-mick-884036 This issue has been fixed. Verified on rhel5.9 and rhel6.4 (x86_64, i386) packages used for testing: qpid-cpp-*-0.18-14 -> VERIFIED Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0561.html |
Description of problem: testConversionsFromString unit test starts to fail on latest packages: unknown location(0): fatal error in "testConversionsFromString": std::exception: invalid conversion: Cannot convert -0 (qpid/types/Variant.cpp:126) This issue is only valid for rhel5 (tested on rhel5.8 and rhel5.9 - x86_64/i386), rhel6.x do not suffer from that. Version-Release number of selected component (if applicable): qpid-cpp-*-0.18-12.el5 How reproducible: 100% Steps to Reproduce: 1. execute c++ unit test testConversionsFromString Actual results: testConversionsFromString fails Expected results: testConversionsFromString pass Additional info: # SPATH=$(pwd) # g++ -Wall -DBOOST_TEST_DYN_LINK -I${SPATH}/tests -I${SPATH} -I/usr/include/qpid-boost ${SPATH}/tests/Variant.cpp ${SPATH}/tests/unit_test.cpp -lboost_unit_test_framework -lqpidclient -lqpidmessaging -lqmfconsole -lqpidbroker -o unit_test_custom # BOOST_TEST_LOG_LEVEL=all ./unit_test_custom Running 10 test cases... Entering test suite "Master Test Suite" Entering test suite "VariantSuite" Entering test case "testConversionsFromString" <snip/> /mnt/tests/distribution/MRG/Messaging/qpid_common/qpid-tree/cpp/src/tests/Variant.cpp(135): info: check 0 == value.asInt16() passed unknown location(0): fatal error in "testConversionsFromString": std::exception: invalid conversion: Cannot convert -0 (qpid/types/Variant.cpp:126)