Opened 6 years ago
Last modified 4 years ago
#12821 new Bugs
Crash in integer_sort when reverse sorting a struct
Reported by: | Domagoj Šarić | Owned by: | Paul A. Bristow |
---|---|---|---|
Milestone: | To Be Determined | Component: | sort |
Version: | Boost 1.63.0 | Severity: | Showstopper |
Keywords: | 1 | Cc: | arachni@… |
Description (last modified by )
I have a custom 'zip' iterator (that iterates over two arrays):
- its value_type = std::pair<std::uint32_t, T>
- its reference = std::pair<std::uint32_t &, T &>.
I want to reverse sort these two arrays so I do:
auto const comparator( []( auto const & left, auto const & right ) noexcept { return left.first > right.first; } ); auto const rightshift{ []( custom_iterator::reference const x, unsigned const offset ) noexcept { return x.first >> offset; } };
...but there is a crash in integer_sort in this case (if I do a 'normal' less-than compare, i.e. not a reversed sort) then it works...
Change History (4)
follow-up: 4 comment:1 by , 6 years ago
Description: | modified (diff) |
---|
comment:2 by , 6 years ago
Description: | modified (diff) |
---|
comment:3 by , 6 years ago
Description: | modified (diff) |
---|
comment:4 by , 4 years ago
Cc: | added |
---|---|
Keywords: | 1 added |
Note:
See TracTickets
for help on using tickets.
1"'`--