This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++ Bug? use of alloca in a function prevents exception handler walkback on ppc linux
- To: gcc at gcc dot gnu dot org, khendricks at ivey dot uwo dot ca
- Subject: Re: g++ Bug? use of alloca in a function prevents exception handler walkback on ppc linux
- From: Mike Stump <mrs at windriver dot com>
- Date: Thu, 14 Dec 2000 09:22:27 -0800 (PST)
- Cc: Franz dot Sirl-kernel at lauterbach dot com, dje at watson dot ibm dot com, geoffk at geoffk dot org
> From: "Kevin B. Hendricks" <kevin.hendricks@sympatico.ca>
> Date: Thu, 14 Dec 2000 11:40:27 -0500
> To: gcc@gcc.gnu.org
> Cc: dje@watson.ibm.com, geoffk@geoffk.org, Franz.Sirl-kernel@lauterbach.com
> With a lot of help from Philipp Lohmann from Sun Germany, we have
> tracked the problem on ppc linux exception handling to the use of
> alloca in any function in the path back to the exception handler.
Ok.
> Is this a g++ bug?
Yes, I suspect so. Or, more properly, this seems to be a bug in the
DWARF2 EH bits for the PowerPC. I tried this on x86 linux, using a
top of tree compiler, and it worked fine, so I believe that the
machine independent code might be fine.
> Should dynamic allocation of stack space prevent the search back
> through the function by throw_helper?
Nope.
> Any guidance about how to deal with this would be greatly appreciated.
If you want to fix it, check out the DWARF2 bits in the rs6000 port.
Jason might be able to give better advice in this area, as he is more
familiar with these bits. Compile up the libgcc2 bits with debugging
turned on, and then step though it and watch how the EH runtime walks
the frame. Understand every addition and every fetch it does. Watch
the registers being restored, and from where they come from, and
ensure that is where the generated code put them.
Oh, I assume that you've already tried the top of the tree. If not,
please give it a try and see if it works.