Re: [Boost-bugs] [Boost C++ Libraries] #12861: Segmentation fault when creating R-tree with packing algorithm with gcc4.8.2

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12861: Segmentation fault when creating R-tree with packing algorithm with gcc4.8.2
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-02-23 22:23:34


#12861: Segmentation fault when creating R-tree with packing algorithm with
gcc4.8.2
---------------------------------+----------------------
  Reporter: michael.moessner@… | Owner: awulkiew
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: geometry
   Version: Boost 1.63.0 | Severity: Problem
Resolution: | Keywords: rtree
---------------------------------+----------------------

Comment (by awulkiew):

 AFAIU these NaNs are inside not yet initialized m_box inside
 expandable_box:

 https://svn.boost.org/trac/boost/attachment/ticket/12861/gdb-
 walkthrough#L106

 created on stack:

 https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/index/detail/rtree/pack_create.hpp#L273

 `per_level` function is called recursively. Is it possible that the stack
 size is too small? I'm also concerned about the `<error reading
 variable>`:

 https://svn.boost.org/trac/boost/attachment/ticket/12861/gdb-
 walkthrough#L105

 Is it possible that this is caused by optimization enabled? I can see that
 there are some `<optimized out>` in the GDB output. If that's the case
 could you generate similar file with optimization disabled?

 Or try to debug it in file pack_create.hpp around line 273, e.g. see if it
 always fails for the same data and then try to catch it. Maybe this
 compiler has something against this expression:

 `translator(*(first->second))`

 where first->second should be an iterator of Range you passed into the
 rtree ctor (it takes Range const&, so the iterator type should be
 std::vector<rtree_elem>::const_iterator), and translator's operator()
 should take const reference to Value type (`std::pair<boost_box, int>
 const&`) and return const reference to `boost_box const&`.

 If you don't want to play with it, then I'll find some time in the near
 future to install SUSE ED 11 SP4 and gcc-4.8.2, and maybe I'll be able to
 reproduce it.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12861#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-23 22:27:01 UTC