[Bug c++/20020] GDB segfault on printing objects
ppluzhnikov at google dot com
sourceware-bugzilla@sourceware.org
Sun Mar 24 20:38:00 GMT 2019
https://sourceware.org/bugzilla/show_bug.cgi?id=20020
Paul Pluzhnikov <ppluzhnikov at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppluzhnikov at google dot com
--- Comment #15 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
Another trivial reproducer from
https://stackoverflow.com/questions/55314720/gdb-crashes-when-printing-value-of-atomic-enum
#include <atomic>
enum class foo {ONE, TWO, THREE, FOUR, FIVE, SIX};
int main(int argc, char **argv)
{
std::atomic<foo> x = foo::FOUR;
std::atomic<int> y = int(foo::FOUR);
return 0;
}
g++ -g -std=c++17 t.cc
(gdb) print y -- works fine
(gdb_ print x -- crash in value_entirely_covered_by_range_vector(), using
current trunk.
value_entirely_covered_by_range_vector (value=value@entry=0x0, ranges=...) at
../../gdb/value.c:416
416 if (value->lazy)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list