[Bug c++/28605] internal-error: Should not be able to create a lazy value with an enclosing type

tromey at sourceware dot org sourceware-bugzilla@sourceware.org
Sat Feb 19 16:40:17 GMT 2022


https://sourceware.org/bugzilla/show_bug.cgi?id=28605

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
I think we'd need more information to try to fix this bug.
One thing that might be useful is a stack trace showing
the path taken by gdb to the error.

The very best thing would be a small C++ test case and a sequence
of commands that can be used to reproduce the crash.  (I realize
this is probably hard though)

I somewhat suspect that the assertion is in error, as the code
says:

  if (from != nullptr)
    {
      from_contents = value_contents (from).data ();
      v_contents = nullptr;
    }
  else
    {
      if (value_type (v) != value_enclosing_type (v))
        internal_error (__FILE__, __LINE__,
                        _("Should not be able to create a lazy value with "
                          "an enclosing type"));

... but when I look at this I don't see anything that's obviously
checking for a lazy value.

However, looking at the most recent patch in this area, I see the
assertion goes back a ways.  So I'm not certain that the check
is wrong, and I wonder what really changed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list