[Boost-bugs] [Boost C++ Libraries] #9053: Infinite recursion assigning "const any" with GCC 4.8 in C++11 mode

Subject: [Boost-bugs] [Boost C++ Libraries] #9053: Infinite recursion assigning "const any" with GCC 4.8 in C++11 mode
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-27 16:00:37


#9053: Infinite recursion assigning "const any" with GCC 4.8 in C++11 mode
--------------------------------+---------------------
 Reporter: Di-an Jan <djan@…> | Owner: nasonov
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: any
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
--------------------------------+---------------------
 Infinite recursion assigning "`const any`" with GCC 4.8 in C++11 mode
 because "`boost::disable_if<boost::is_same<any&, ValueType> >`"
 is not triggered with a "`const any`".
 This leads to infinite recursion at run time with no compiler warnings.
 Happens with Boost 1.54.0 and boost-trunk.

 {{{
 $ cat test-any.cpp
 #include <iostream>
 #include <boost/any.hpp>

 int main() {
     const boost::any a = 1;
     boost::any x = a;
     std::cout << boost::any_cast<int>(x) << std::endl;
     return 0;
 }

 $ g++ -g --std=c++11 -pedantic -Wall -Wextra -I ~/boost-trunk test-any.cpp

 $ gdb ./a.out
 (gdb) r
 Starting program: a.out

 Program received signal SIGSEGV, Segmentation fault.
 0x00007ffff731f2e7 in _int_malloc () from /lib64/libc.so.6
 (gdb) bt -10
 #224597 0x0000000000401399 in boost::any::any<boost::any const>(boost::any
 const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>,
 void>::type*) (
     this=0x604098, value=<unknown type in a.out, CU 0x0, DIE 0x4300>) at
 boost-trunk/boost/any.hpp:80
 #224598 0x00000000004014fa in boost::any::holder<boost::any
 const>::holder(boost::any const&&) (this=0x604090,
     value=<unknown type in a.out, CU 0x0, DIE 0x44e1>) at boost-
 trunk/boost/any.hpp:188
 #224599 0x0000000000401399 in boost::any::any<boost::any const>(boost::any
 const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>,
 void>::type*) (
     this=0x604078, value=<unknown type in a.out, CU 0x0, DIE 0x4300>) at
 boost-trunk/boost/any.hpp:80
 #224600 0x00000000004014fa in boost::any::holder<boost::any
 const>::holder(boost::any const&&) (this=0x604070,
     value=<unknown type in a.out, CU 0x0, DIE 0x44e1>) at boost-
 trunk/boost/any.hpp:188
 #224601 0x0000000000401399 in boost::any::any<boost::any const>(boost::any
 const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>,
 void>::type*) (
     this=0x604058, value=<unknown type in a.out, CU 0x0, DIE 0x4300>) at
 boost-trunk/boost/any.hpp:80
 #224602 0x00000000004014fa in boost::any::holder<boost::any
 const>::holder(boost::any const&&) (this=0x604050,
     value=<unknown type in a.out, CU 0x0, DIE 0x44e1>) at boost-
 trunk/boost/any.hpp:188
 #224603 0x0000000000401399 in boost::any::any<boost::any const>(boost::any
 const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>,
 void>::type*) (
     this=0x604038, value=<unknown type in a.out, CU 0x0, DIE 0x4300>) at
 boost-trunk/boost/any.hpp:80
 #224604 0x00000000004014fa in boost::any::holder<boost::any
 const>::holder(boost::any const&&) (this=0x604030,
     value=<unknown type in a.out, CU 0x0, DIE 0x44e1>) at boost-
 trunk/boost/any.hpp:188
 #224605 0x0000000000401399 in boost::any::any<boost::any const>(boost::any
 const&&, boost::disable_if<boost::is_same<boost::any&, boost::any const>,
 void>::type*) (
     this=0x7fffffffdcb0, value=<unknown type in a.out, CU 0x0, DIE
 0x4300>) at boost-trunk/boost/any.hpp:80
 #224606 0x0000000000400e20 in main () at test-any.cpp:5
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9053>
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-16 18:50:14 UTC