Re: [downstream patch FYI] workaround stale frame_info * (PR 13866)

Tom Tromey
2012-05-18T17:44:34Z

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> With proper C++ sanity check of stale live frame_info references
Jan> the testcase would be simple without the "frame_garbage_collection"
Jan> reproducer below. It is also reproducible just with valgrind but
Jan> regularly running the whole testsuite under valgrind I did not find
Jan> feasible.

I was thinking about this problem recently.

One idea would be to only let unwinders access struct frame_info, and
have all other code use struct frame_id, perhaps with some simple cache
so that repeated calls for a given frame_id will not cause too much
work.

This would make it much harder to cache information when not allowed.

On the minus side, there are 1300 uses of struct frame_info to audit.

Tom