11 points | 3d ago | Discuss on Hacker News | Back to Radar
A couple of things I can think of: first, the model for interfacing to "compiled code" — both C extensions, and compiled Python bytecode — isn't expected to be secure anyway, and never has been. You can trivially wrap a garbage `bytes` in a `code` object, execute it and get a segfault; and you can trivially use the `ctypes` API to corrupt memory. Second, the normal use paths are well-tested and bottom out in an interpretation layer that isn't very well optimized because of how much dynamic nonsense it has to support (even beyond other languages in its class like Ruby).
On the other hand, the bytecode format tends to change with almost every "minor" release (i.e. annually now). There's probably plenty of room for a mistake in that churn.
Comments are loaded live from Hacker News and are not stored by Mid or Real.