Commits

Armin Rigo committed f62e922

Report at least a little bit more clearly than "Fatal RPython error:
OSError".

  • Participants
  • Parent commits 08dbc60

Comments (0)

Files changed (1)

pypy/module/_ffi/interp_funcptr.py

                                                                w_restype)
     addr = rffi.cast(rffi.VOIDP, addr)
     func = libffi.Func(name, argtypes, restype, addr, flags)
-    return W_FuncPtr(func, argtypes_w, w_restype)
+    try:
+        return W_FuncPtr(func, argtypes_w, w_restype)
+    except OSError:
+        raise OperationError(space.w_SystemError,
+                         space.wrap("internal error building the Func object"))
 
 
 W_FuncPtr.typedef = TypeDef(