Explorar o código

Raise exception on ambiguous vtable entries

nosoop hai 11 meses
pai
achega
7f23452ab7
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      src/smgdc/vtable.py

+ 4 - 1
src/smgdc/vtable.py

@@ -124,7 +124,10 @@ def get_vtables_from_address(
             if matched_overload:
                 function_list.append(VTableFunction(table_index, matched_overload))
                 continue
-        function_list.append(VTableFunction(table_index, None))
+        # TODO: we need to resolve a symbol here; otherwise we can't correctly handle this
+        vt_name = itanium_demangler.parse(vt.name)
+        candidate_names = set(sym.name for sym in fnsyms)
+        raise Exception(f"Ambiguity in {vt_name} position {n}; candidates {candidate_names}")
 
     return [
         list(vfn.sym for vfn in vtbl)