proposed patch for gcse.c (delete null pointer checks)

Marc Espie
Tue Nov 30 23:59:00 GMT 1999

On Mon, Nov 08, 1999 at 11:40:06AM -0500, Thomas R. Truscott wrote:
> > AmigaOS has relevant information at address 4.
> The concern is that delete-null-pointer-checks might
> introduce bugs due to access of explicit low memory addresses.
> Although I doubt this is a significant risk on the Amiga,
> because I suspect such accesses happen in only a few routines
> (e.g. run-time startup), this concern cannot be ignored
> when it comes to operating system code.
Unfortunately, you're wrong.
AbsExecBase is the base pointer to the main library, which happens
to hold some data structures, along with function pointers.
Normally, there is another copy of that library in fast memory,
which is easy to get to from startup code, and which does no longer
reference address 4.

But there's also a whole amount of legacy code that never goes
to that trouble, and happily dereferences address 4 all over the place.

More information about the Gcc-patches mailing list