Settings

Theme

What would cause a Python interpreter to crash? A good interview question

sef.kloninger.com

5 points by sefk 3 months ago · 5 comments

Reader

tkluck 3 months ago

I clicked the link expecting a discussion of what would cause a Python interpreter to crash, but found only a generic list of low level problems for any piece of software, and the statement that the headline was an interview question at YouTube ten years ago.

zahlman 3 months ago

> I remember this leading to a fun, rambling, back-and-forth discussion of the ways computers can fail. There are so many! Every level of the stack can fail in interesting ways: storage, RAM, memory management, networking. How would a bit flip in a TLB manifest? How does TCP/IP detect and handle ordering? collisions?

Sure, but the simplest ways (at least with CPython) are to invoke C code that crashes via the FFI, or to manually explicitly create a code object from invalid bytecode data (or hex-edit a .pyc file so that the usual machinery does it for you).

Also, as usual I'm tired of the implication that networking is a necessary component of "the stack".

sefkOP 3 months ago

I liked the interview question that I got when interviewing at YouTube in 2015.

Discuss what would cause a Python interpreter to crash. Not a program written in Python, but the interpreter itself.

samdoesnothing 3 months ago

This seems like an orthogonal question to architecture doesn't it?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection