[Bug libstdc++/80183] [7 Regression] Conditional jump or move depends on uninitialised value: std::local_Rb_tree_decrement(std::_Rb_tree_node_base*) (tree.cc:97)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80183 --- Comment #7 from François Dumont --- (In reply to Jonathan Wakely from comment #4) > I think this is my fault, I asked François to remove a store to _M_color > that I thought was redundant. I was surprised that _M_color wasn't move along with other members, with your patch it is now. However to strictly restore previous behavior you could have only set _M_color to red in the move constructor whether _M_move_data or _M_reset was called. But I prefer current code of course.
[Bug libstdc++/80183] [7 Regression] Conditional jump or move depends on uninitialised value: std::local_Rb_tree_decrement(std::_Rb_tree_node_base*) (tree.cc:97)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80183 Markus Trippelsdorf changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Markus Trippelsdorf --- Fixed.
[Bug libstdc++/80183] [7 Regression] Conditional jump or move depends on uninitialised value: std::local_Rb_tree_decrement(std::_Rb_tree_node_base*) (tree.cc:97)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80183 --- Comment #5 from Markus Trippelsdorf --- Author: trippels Date: Sun Mar 26 12:33:35 2017 New Revision: 246483 URL: https://gcc.gnu.org/viewcvs?rev=246483=gcc=rev Log: Fix PR80183 : _M_color not moved PR libstdc++/80183 * include/bits/stl_tree.h: (_Rb_tree_header::_M_move_data(_Rb_tree_header&)): Also save _M_color. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/stl_tree.h
[Bug libstdc++/80183] [7 Regression] Conditional jump or move depends on uninitialised value: std::local_Rb_tree_decrement(std::_Rb_tree_node_base*) (tree.cc:97)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80183 Jonathan Wakely changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #4 from Jonathan Wakely --- I think this is my fault, I asked François to remove a store to _M_color that I thought was redundant.
[Bug libstdc++/80183] [7 Regression] Conditional jump or move depends on uninitialised value: std::local_Rb_tree_decrement(std::_Rb_tree_node_base*) (tree.cc:97)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80183 Markus Trippelsdorf changed: What|Removed |Added Target Milestone|--- |7.0 --- Comment #3 from Markus Trippelsdorf --- The problem is here libstdc++-v3/include/bits/stl_tree.h: 179 #if __cplusplus >= 201103L 180 _Rb_tree_header(_Rb_tree_header&& __x) noexcept 181 { 182 if (__x._M_header._M_parent != nullptr) 183 _M_move_data(__x); 184 else 185 { 186 _M_header._M_color = _S_red; 187 _M_reset(); 188 } 189 } 190 #endif 191 192 void 193 _M_move_data(_Rb_tree_header& __from) 194 { 195 _M_header._M_parent = __from._M_header._M_parent; 196 _M_header._M_left = __from._M_header._M_left; 197 _M_header._M_right = __from._M_header._M_right; 198 _M_header._M_parent->_M_parent = &_M_header; 199 _M_node_count = __from._M_node_count; 200 201 __from._M_reset(); 202 } 203 204 void 205 _M_reset() 206 { 207 _M_header._M_parent = 0; 208 _M_header._M_left = &_M_header; 209 _M_header._M_right = &_M_header; 210 _M_node_count = 0; 211 } 212 }; on line 183 _M_move_data(__x) doesn't set _M_header._M_color to any value. So either hard set it to _S_red or augment _M_move_data to copy the color.
[Bug libstdc++/80183] [7 Regression] Conditional jump or move depends on uninitialised value: std::local_Rb_tree_decrement(std::_Rb_tree_node_base*) (tree.cc:97)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80183 Markus Trippelsdorf changed: What|Removed |Added Priority|P3 |P1 Status|UNCONFIRMED |NEW Last reconfirmed||2017-03-25 CC||fdumont at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from Markus Trippelsdorf --- Started with r243379.
[Bug libstdc++/80183] [7 Regression] Conditional jump or move depends on uninitialised value: std::local_Rb_tree_decrement(std::_Rb_tree_node_base*) (tree.cc:97)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80183 --- Comment #1 from Markus Trippelsdorf --- Created attachment 41052 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41052=edit testcase. valgrind clang-format bench.ii