[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] missing check after calling type_size in classify_x86
From: |
Pascal Cuoq |
Subject: |
Re: [Tinycc-devel] missing check after calling type_size in classify_x86_64_arg |
Date: |
Mon, 24 Jun 2019 08:32:30 +0000 |
> On 24 Jun 2019, at 05:01, Michael Matz <address@hidden> wrote:
>
> diff --git a/tccgen.c b/tccgen.c
> index c65cf76..84e0953 100644
> --- a/tccgen.c
> +++ b/tccgen.c
> @@ -4507,6 +4507,8 @@ static int post_type(CType *type, AttributeDef *ad, int
> storage, int td)
> post_type(type, ad, storage, 0);
> if (type->t == VT_FUNC)
> tcc_error("declaration of an array of functions");
> + else if ((type->t & VT_BTYPE) == VT_VOID || type_size(type, &l) < 0)
> + tcc_error("wrong!");
> t1 |= type->t & VT_VLA;
>
> if (t1 & VT_VLA) {
As you wish, but I still intend to fix the “arrays of const functions” bug at
the same time. Also I declared a different variable align_unused because, if I
used the existing variable align, I wouldn't want the next person reading this
function, who might be me, to wonder whether the value from this call is used
on purpose later.
Pushed to mob.
Pascal
- [Tinycc-devel] missing check after calling type_size in classify_x86_64_arg, Pascal Cuoq, 2019/06/20
- Re: [Tinycc-devel] missing check after calling type_size in classify_x86_64_arg, Michael Matz, 2019/06/21
- Re: [Tinycc-devel] missing check after calling type_size in classify_x86_64_arg, Pascal Cuoq, 2019/06/22
- Re: [Tinycc-devel] missing check after calling type_size in classify_x86_64_arg, Michael Matz, 2019/06/22
- Re: [Tinycc-devel] missing check after calling type_size in classify_x86_64_arg, Pascal Cuoq, 2019/06/23
- Re: [Tinycc-devel] missing check after calling type_size in classify_x86_64_arg, Michael Matz, 2019/06/23
- Re: [Tinycc-devel] missing check after calling type_size in classify_x86_64_arg, Pascal Cuoq, 2019/06/23
- Re: [Tinycc-devel] missing check after calling type_size in classify_x86_64_arg, Michael Matz, 2019/06/23
- Re: [Tinycc-devel] missing check after calling type_size in classify_x86_64_arg,
Pascal Cuoq <=
- Re: [Tinycc-devel] missing check after calling type_size in classify_x86_64_arg, grischka, 2019/06/24
- Re: [Tinycc-devel] missing check after calling type_size in classify_x86_64_arg, Pascal Cuoq, 2019/06/24