> But, fails whenever the size of the mode of the save area is bigger than a
> certain amount… On my port, the size taken up by the save area is large
> enough to cause this to fail. :-(
That's a bit unexpected, why do you need so big a save area exactly? The only
architecture for which this
>OK - here is your version of the patch, extended with a comment which
> I think is helpful for other people reading the code, and with the
> changes to builtins.c and md.texi removed, since the size of the buffer
> is not changing.
>
>Is this version OK to apply ?
Yes, IMO that's fine, t
Hi Eric,
OK - here is your version of the patch, extended with a comment which
I think is helpful for other people reading the code, and with the
changes to builtins.c and md.texi removed, since the size of the buffer
is not changing.
Is this version OK to apply ?
Cheers
Nick
gcc/Cha
On May 15, 2014, at 12:55 AM, Eric Botcazou wrote:
> No, that's too complicated and risky, just do the following:
>
> /* builtin_setjmp takes a pointer to 5 words or pointers. */
> if (POINTER_SIZE > BITS_PER_WORD)
> tmp = size_int (4);
> else
> tmp = size_int (5 * BIT
> Ah - you are worried about the case where STACK_SAVEAREA_MODE() is
> smaller than Pmode, yes ?
No, simply that the modified formula is plain wrong. The code does:
tmp = size_int (5 * BITS_PER_WORD / POINTER_SIZE - 1);
tmp = build_index_type (tmp);
tmp = build_array_type (ptr_type_node, t
Hi Eric,
2014-05-06 Nick Clifton
* except.c (init_eh): Fix computation of builtin setjmp buffer
size.
That's the same patch as
https://gcc.gnu.org/ml/gcc-patches/2011-11/msg00272.html
and is still incorrect.
Ah - you are worried about the case where STACK_SAVEAREA_MODE
> Now we just need a __builtin_setjmp style of maintainer to review…
Let's just do what I suggested in
https://gcc.gnu.org/ml/gcc-patches/2011-11/msg00286.html
--
Eric Botcazou
> 2014-05-06 Nick Clifton
>
> * except.c (init_eh): Fix computation of builtin setjmp buffer
> size.
That's the same patch as
https://gcc.gnu.org/ml/gcc-patches/2011-11/msg00272.html
and is still incorrect.
--
Eric Botcazou
On May 8, 2014, at 7:24 AM, Nicholas Clifton wrote:
>
> What do you think of this version ?
Now we just need a __builtin_setjmp style of maintainer to review…
Hi Mike,
How about GET_MODE_SIZE (STACK_SAVEAREA_MODE (SAVE_NONLOCAL)) / GET_MODE_SIZE
(Pmode) + 2 + /* slop for mips, see builtin_setjmp_setup */ 1 - 1. This
retains the slop for mips, and fixes ports like ia64 and s390 (see
STACK_SAVEAREA_MODE on those ports, it is larger one might expect)
On May 6, 2014, at 8:07 AM, Nicholas Clifton wrote:
> + tmp = size_int ((5 * MAX (POINTER_SIZE, BITS_PER_WORD)) /
> BITS_PER_WORD - 1);
This is not right. The denominator should either be GET_MODE_SIZE (Pmode) or
POINTER_SIZE. See get_nl_goto_field for additional fun.
Also, the save are
Hi Jakub,
But what will this do on targets where POINTER_SIZE is smaller than
BITS_PER_WORD? E.g. I think some options on s390 or ppc.
If you want it to be always 5 pointers, then you want
tmp = size_int (4);
and not something else, otherwise it really depends on how exactly it is
used, perh
On Tue, May 06, 2014 at 03:34:37PM +0100, Nicholas Clifton wrote:
> --- gcc/except.c (revision 210096)
> +++ gcc/except.c (working copy)
> @@ -286,8 +286,8 @@
>tmp = size_int (FIRST_PSEUDO_REGISTER + 2 - 1);
> #endif
> #else
> - /* builtin_setjmp takes a pointer to 5 words.
On Tue, May 6, 2014 at 4:34 PM, Nicholas Clifton wrote:
> Hi Jakub,
>
>
>>> /* builtin_setjmp takes a pointer to 5 words. */
>>> - tmp = size_int (5 * BITS_PER_WORD / POINTER_SIZE - 1);
>>> + tmp = size_int (5 * POINTER_SIZE / BITS_PER_WORD - 1);
>
>
>> That doesn't look correct
Hi Jakub,
/* builtin_setjmp takes a pointer to 5 words. */
- tmp = size_int (5 * BITS_PER_WORD / POINTER_SIZE - 1);
+ tmp = size_int (5 * POINTER_SIZE / BITS_PER_WORD - 1);
That doesn't look correct to me. If the code wants to create 5 words long
array, but with pointer el
On Tue, May 06, 2014 at 01:55:18PM +0100, Nick Clifton wrote:
> 2014-05-06 Nick Clifton
>
> * except.c (init_eh): Fix computation of builtin setjmp buffer
> size.
>
> Index: gcc/except.c
> ===
> --- gcc/except.c (
Hi Guys,
There is a small bug in the computation for the size of the builtin
setjmp buffer. The size is based upon BITS_PER_WORD / POINTER_SIZE
which for most targets equates to 1. But for targets where pointers
are larger than a word, it equates to zero. This leads to stack
corruptio
17 matches
Mail list logo