libboost 1.58 fails to compare non standard uuid
Bug #1708308 reported by
Giovanni G.
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
boost1.58 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Description: Ubuntu 16.04.2 LTS
Release: 16.04
The compare operator for uuid is broken for non standard (always return false). This for example breaks using uuid as keys in std::map which uses less than comparator.
The example program generates 2 non standard uuid then compares them with < > and ==. All three returns false
Then it creates a std::map<
Insert a string in the map using the first uuid as key, then try to access the second key value with .at
It should raise an exceptio instead it returns the value from the first key
This bug has been fixed in boost 1.59
summary: |
- libbost 1.58 fails to compare non standard uuid + libboost 1.58 fails to compare non standard uuid |
tags: | added: xenial |
To post a comment you must log in.
Output from test program with boost 1.58 and boost 1.59 0000-0000- 0000-0000000001 00 0000-0000- 0000-0000000001 31 "00000000- 0000-0000- 0000-0000000001 00"] = Riga a "00000000- 0000-0000- 0000-0000000001 00"] = Riga a "00000000- 0000-0000- 0000-0000000001 31"] = Riga a (Should raise an exception because we never
Compiled against boost 1_58
a = 00000000-
b = 00000000-
a !< b
a !> b
a != b
mappa[
Mappa contains 1 elements
Mappa[
Mappa[
assigned it)
Compiled against boost 1_59 0000-0000- 0000-0000000001 00 0000-0000- 0000-0000000001 31 "00000000- 0000-0000- 0000-0000000001 00"] = Riga a "00000000- 0000-0000- 0000-0000000001 00"] = Riga a "00000000- 0000-0000- 0000-0000000001 31"] = Raised std::out_of_range map::at as it ought to
a = 00000000-
b = 00000000-
a < b
a !> b
a != b
mappa[
Mappa contains 1 elements
Mappa[
Mappa[
be