Modify

#12190 closed Bugs (fixed)

Intrusive List + Flat Map combination crashes

Reported by: arpansen@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: container
Version: Boost 1.59.0 Severity: Problem
Keywords: Cc: arpansen@…

Description

Please consider the following code, this crashes with slist but works just fine if I replace slist with list. Also flat_map crashes but std::map works fine. Am I doing something gross or is there a bug here?

#include <iostream> #include <boost/container/flat_map.hpp> #include <map> #include <boost/intrusive/list.hpp> #include <boost/intrusive/slist.hpp>

using namespace boost::intrusive;

struct m : public slist_base_hook<> {

int n; public:

m(int k) : n(k) { }

};

int main() {

boost::container::flat_map<int, slist<m, cache_last<true> > > c1; std::map<int, slist<m, cache_last<true> > > c2; m* m1 = new m(22); c1[1].push_back(*m1);

m* tt = new m(99); c2[1].push_back(*tt);

}

Attachments (0)

Change History (1)

comment:1 Changed 17 months ago by Ion Gaztañaga

Resolution: fixed
Status: newclosed

Thanks for the report. Fixed develop branch in commit with SHA-1: cd14ffcf1f2b01f7ab63b44d9208105c1c55b09b

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ion Gaztañaga.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.