Linux is actually a good example. Of course, one of Torvalds' main drivers is "never break user space." Which is essentially the stability I am talking about here.
It is also a great example, in that it is also not written in a way that academia approves of. Is famous for this, actually. (Among many other points, of course.)
I'll have to look up Bernstein's bet.
And, you'd be surprised how many statically linked binaries from 20 years ago won't run on modern setups.
Since IBM z-Series just hit the frontpage, you can add lots of COBOL and PL/I code which runs unchanged for the last 50 years. However, it is all proprietary and impossible to estimate.
The COBOL and related code is an interesting data point. I would be interested to know just how bug free it all is, versus just used in ways that don't trigger bugs. Still, they definitely count as long running software, if not highly ported.
Linux. You can run still run a statically linked executable from 20 years ago. Of course, Linux today has many bugs, but if we use TeX's definition of stability we are only allowed to use the features we had 20 years ago.
qmail. Bernstein's bet is still open.
sh, ed, vi, grep, sed, and more of the default UNIX tools provided you restrict them to their POSIX functionality (no Unicode etc).