CoursePython from Scratch to Intermediate · Module 6: Functions · part 44 of 75
Part 44 · Module 6: Functions

Incident: Reused code trusted a missing safety check

6 min read·14 Oct 2026
Module 6 · Incident file · About 30 minutes

What happened

Older machines with interlocks Therac-25 software reused 1985 to 1987 overdoses 1993 investigation Leveson and Turner, IEEE Computer, 1993
Software from earlier machines (grey) was reused in the Therac-25 (blue); patients were overdosed between 1985 and 1987 (red, the failure); Leveson and Turner published their investigation in 1993 (green).

The Therac-25 was a radiation therapy machine. Between 1985 and 1987, patients treated with it were given overdoses of radiation. In 1993 Nancy Leveson and Clark Turner published their investigation of the accidents, "An Investigation of the Therac-25 Accidents", in the journal IEEE Computer.

One of their findings is the one this module's skills speak to. The Therac-25 reused software from earlier machines. Those earlier machines had hardware safety interlocks: physical checks that stopped the machine when something was wrong. The reused software had been written for machines that had them, and it assumed they were there. The Therac-25 did not have those interlocks. The software's hidden assumption had nothing left to rest on.

Earlier machines
reused software
+ hardware interlocks
a fault is stopped
by the hardware
Therac-25
the same software
no such interlocks
the assumption remained
with nothing behind it
The same software was safe where its assumption held (green) and unsafe where the interlocks it assumed were missing (red).

This file keeps to those facts. The paper describes much more, and is worth reading in full. What matters here is the shape of the failure: code that was correct where it was written, moved somewhere new, still trusting a check that lived outside it.

The rest of this part opens with an account

Signing up is free and takes one email. Nothing to pay, and nothing renews.