This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] python/varobj: Fix accessing !IS_VALID EXPs


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

Jan> the proposed gdb_assert in varobj_ensure_python_env is IMO correct.

Jan> I am not completely sure where/if other similiar fixups are required.

At least varobj_get_display_hint and varobj_set_visualizer.

If you add that assertion then free_variable needs some work.
It acquires the GIL to delete things.  Perhaps these things need to be
deleted elsewhere now, like when the varobj is invalidated.

Jan> Despite those pointers stay != NULL.
Jan> I am still not completely sure it is stale-pointers-safe but it may be.

Yeah, it is not clear to me whether these fields are expected to remain
valid while the varobj is not.

If they are intended to be invalidated, I agree, we should free and
clear everything at the point of invalidation.

Based on the code I would guess that the current setup (leaving these
fields valid) is intentional.  I don't understand why, though.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]