  Late in their evolution, massive stars may undergo periods of violent
instability and mass loss, but the mechanism responsible for these episodes has
not been identified. We study one potential contributor: the development of
local radiation-driven instabilities in the outer layers of main sequence (MS)
and post-MS massive stars. We construct a sequence of massive stellar evolution
models and investigate where they are subject to local radiative instabilities,
both in the presence of magnetic fields and without them,and at a range of
metallicities. We find that these types of instabilities do not occur in
solar-metallicity MS stars up to 100\,M$_\odot$, but they set in immediately
post-MS for stars heavier than $\sim 25$\,M$_\odot$. Once an instability
appears, it involves a significant amount of mass in the star's upper layers
(up to $\sim 1$ per cent of the initial stellar mass), suggesting that
radiation-driven instabilities are a potentially viable mechanism for dynamic
mass loss. We find that the presence of magnetic fields at strengths low enough
not to disturb the hydrostatic balance of the star does not alter these
results. Stars with sub-Solar metallicity also show instability, but their
instabilities involve less mass and appear later in the star's evolution.
