Exception Handling Bug (smashing global registers) -- 19990628 and earlier
Mike Stump
mrs@wrs.com
Tue Jun 29 09:55:00 GMT 1999
> From: "Melissa O'Neill" <oneill@cs.sfu.ca>
> Date: Tue, 29 Jun 1999 01:46:11 -0700
> It seems the code that handles exceptions doesn't take account of
> global register assignments a program may have, at least on
> solaris-sparc platforms.
My take is this, printf is a call. The registers are documented as
being destroyed by calls. Either don't call anything, or recompile
your entire application with those flags. In this context, your
entire application means all code that you can call (directly or
indirectly). This includes libc, libgcc, libstdc++ and all third
party libraries.
Welcome to the world of -ffixed-.
You could do call saved, but the compiler may need a little bit of
work to support that.
What do the sparc heads among us think?
More information about the Gcc-bugs
mailing list