Opened 6 years ago

Last modified 6 years ago

#12872 new Bugs

icl calls set::insert with invalid iterator hint

Reported by: David Lacey <dave.lacey@…> Owned by: Joachim Faulhaber
Milestone: To Be Determined Component: ICL
Version: Boost 1.63.0 Severity: Problem
Keywords: Cc:

Description

When using split_interval_set<T> the code in the add_segment function in interval_base_set.hpp tries to get the prior of an iterator that may be the first iterator of the underlying set container. This is then used as an insertion hint which causes a segfault in some standard container libraries (for example, the standard library on macOS).

All other parts of the file use cyclic_prior for this purpose.

Attachments (1)

icl_test.cpp (492 bytes ) - added by David Lacey <dave.lacey@…> 6 years ago.
Test case to reproduce problem

Download all attachments as: .zip

Change History (2)

by David Lacey <dave.lacey@…>, 6 years ago

Attachment: icl_test.cpp added

Test case to reproduce problem

comment:1 by David Lacey <dave.lacey@…>, 6 years ago

I've created a pull request here:

https://github.com/boostorg/icl/pull/8

Note: See TracTickets for help on using tickets.