jan.kratochvil at redhat dot com
2018-06-27 00:01:29 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=23342
Bug ID: 23342
Summary: sanity check stale struct frame_info *
Product: gdb
Version: HEAD
Status: NEW
Severity: enhancement
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: jan.kratochvil at redhat dot com
Target Milestone: ---
GDB code commonly keeps struct frame_info * in local variables while calling
complicated call which possibly calls switch_to_thread() which invalidates
frame cache making the pointer stale.
Fedora had a reduction of such stale pointers:
https://src.fedoraproject.org/rpms/gdb/blob/a0d6e14aa39b8328976cf000849d2d9aa77adfd5/f/gdb-stale-frame_info.patch
[downstream patch FYI] workaround stale frame_info * (PR 13866)
http://sourceware.org/ml/gdb-patches/2012-04/msg00058.html
Message-ID: <***@host2.jankratochvil.net>
One of the possibilities now with C++ would be to make the pointer a RAII
pointer crashing if frame cache gets invalidating while such pointer still
exists. It would be similar to an easier alternative of a std::weak_ptr there.
Bug ID: 23342
Summary: sanity check stale struct frame_info *
Product: gdb
Version: HEAD
Status: NEW
Severity: enhancement
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: jan.kratochvil at redhat dot com
Target Milestone: ---
GDB code commonly keeps struct frame_info * in local variables while calling
complicated call which possibly calls switch_to_thread() which invalidates
frame cache making the pointer stale.
Fedora had a reduction of such stale pointers:
https://src.fedoraproject.org/rpms/gdb/blob/a0d6e14aa39b8328976cf000849d2d9aa77adfd5/f/gdb-stale-frame_info.patch
[downstream patch FYI] workaround stale frame_info * (PR 13866)
http://sourceware.org/ml/gdb-patches/2012-04/msg00058.html
Message-ID: <***@host2.jankratochvil.net>
One of the possibilities now with C++ would be to make the pointer a RAII
pointer crashing if frame cache gets invalidating while such pointer still
exists. It would be similar to an easier alternative of a std::weak_ptr there.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.