That's why there is interest in pushing type safety down to assembly with TALs (typed assembly languages). It'll help to eliminate at most of the 'buffer overflow' type bugs.
And TAL checkers are fairly simple and small, so they can be thoroughly audited.