id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 1531,segfault in dynamic_bitset::reference assign operator,ben.collins@…,jsiek,"I will of course take a look at this later (i.e., I've go to stop here and do the work I get paid to do), but for now, this will serve as a heads up to any one who's interested. Perhaps I'm not initializing {{{bset}}} correctly, but I couldn't easily tell that from the headers or the online documentation. test code: {{{ $ cat bitset.cpp #include #include #include int main() { boost::dynamic_bitset<> bset; bset[0] = true; bset[0] = false; return 0; } }}} compile + gdb session: {{{ $ g++ -I ~/local/include/boost-1_35/ -o bitset bitset.cpp $ ./bitset Segmentation fault $ g++ -g -I ~/local/include/boost-1_35/ -o bitset bitset.cpp $ gdb bitset GNU gdb Red Hat Linux (6.5-15.fc6rh) Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type ""show copying"" to see the conditions. There is absolutely no warranty for GDB. Type ""show warranty"" for details. This GDB was configured as ""i386-redhat-linux-gnu""...Using host libthread_db library ""/lib/libthread_db.so.1"". (gdb) r Starting program: /users/bcollins/test/C++/bitset Program received signal SIGSEGV, Segmentation fault. 0x08048877 in boost::dynamic_bitset >::reference::do_set (this=0xbf856240) at /users/bcollins/local/include/boost-1_35/boost/dynamic_bitset/dynamic_bitset.hpp:115 115 void do_set() { m_block |= m_mask; } (gdb) bt #0 0x08048877 in boost::dynamic_bitset >::reference::do_set (this=0xbf856240) at /users/bcollins/local/include/boost-1_35/boost/dynamic_bitset/dynamic_bitset.hpp:115 #1 0x080488a3 in boost::dynamic_bitset >::reference::do_assign (this=0xbf856240, x=true) at /users/bcollins/local/include/boost-1_35/boost/dynamic_bitset/dynamic_bitset.hpp:118 #2 0x080488d1 in boost::dynamic_bitset >::reference::operator= (this=0xbf856240, x=true) at /users/bcollins/local/include/boost-1_35/boost/dynamic_bitset/dynamic_bitset.hpp:103 #3 0x080486c9 in main () at bitset.cpp:9 (gdb) f 0 #0 0x08048877 in boost::dynamic_bitset >::reference::do_set (this=0xbf856240) at /users/bcollins/local/include/boost-1_35/boost/dynamic_bitset/dynamic_bitset.hpp:115 115 void do_set() { m_block |= m_mask; } (gdb) p m_block $1 = (long unsigned int &) @0x0: Cannot access memory at address 0x0 (gdb) }}}",Bugs,closed,Boost 1.36.0,dynamic_bitset,Boost Development Trunk,Problem,invalid,dynamic_bitset,gennaro.prota@…