Skip to content

Commit

Permalink
Log what target we have when we're looking up a vtable slot
Browse files Browse the repository at this point in the history
Summary: There's a bunch of errors coming out of this where we're failing to find the v-table slot.  It seems likely that we either have the slot patched or that the type isn't actually being defined statically for some reason.  This increases what we report for the error so we can have a chance of figuring out what the issue is.

Reviewed By: alexmalyshev

Differential Revision: D55702279

fbshipit-source-id: c7031fc86d663e5c6db11bf424d41935d62a4471
  • Loading branch information
DinoV authored and facebook-github-bot committed Apr 4, 2024
1 parent b245b1f commit 38ff5a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cinderx/StaticPython/classloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -3759,8 +3759,9 @@ classloader_init_slot(PyObject *path)
PyObject *new_index = PyDict_GetItem(slot_map, slot_name);
if (new_index == NULL) {
PyErr_Format(
PyExc_RuntimeError, "unable to resolve v-table slot '%R' in %s",
slot_name, target_type->tp_name);
PyExc_RuntimeError, "unable to resolve v-table slot %R in %s for %s (%R) is_static: %s used: %s",
slot_name, target_type->tp_name, Py_TYPE(cur)->tp_name, cur,
is_static_type(target_type) ? "true" : "false", used_in_vtable(cur) ? "true" : "false");
Py_DECREF(target_type);
Py_DECREF(cur);
return -1;
Expand Down

0 comments on commit 38ff5a7

Please sign in to comment.