public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrea Corallo <Andrea.Corallo@arm.com>
To: David Malcolm <dmalcolm@redhat.com>
Cc: Andrea Corallo <Andrea.Corallo@arm.com>,
	"gcc-patches@gcc.gnu.org"	<gcc-patches@gcc.gnu.org>,
	"jit@gcc.gnu.org" <jit@gcc.gnu.org>, nd	<nd@arm.com>
Subject: Re: [PATCH][gcc] libgccjit: check result_type in gcc_jit_context_new_binary_op
Date: Tue, 01 Jan 2019 00:00:00 -0000	[thread overview]
Message-ID: <gkrwohbj5x6.fsf@arm.com> (raw)
In-Reply-To: <1561391539.3885.22.camel@redhat.com>


David Malcolm writes:

> On Mon, 2019-06-24 at 15:30 +0000, Andrea Corallo wrote:
>> Hi all,
>> second version for this patch.
>> Given the suggestion for the bit-field one I've tried to improve also
>> here the error message.
>
> Thanks.
>
>> I've added a simple testcase as requested, here I'm trying to do
>> *void=int+int.
>> This without checking would normally crash verifying gimple.
>
> Thanks.  FWIW, I think the testcase can be simplified slightly, in that
> all that's needed is a bogus call to gcc_jit_context_new_binary_op, so
> I don't think the testcase needs the calls to:
>   gcc_jit_context_new_function,
>   gcc_jit_function_new_block, and
>   gcc_jit_block_end_with_return,
> it just needs the types and the gcc_jit_context_new_binary_op call.

Hi Dave,
thanks for your feedback.
I've tried that but the reproducer is then incomplete with no call to
gcc_jit_context_new_binary_op so I would keep it like it is if you are
ok with that.

>> More complex cases can be cause of crashes having the
>> result type structures etc...
>>
>> Tested with make check-jit
>> OK for trunk?
>
> Looks good as-is, or you may prefer to simplify the testcase.
>
> Thanks for the patch.
>
> BTW, I don't see you listed in the MAINTAINERS file; are you able to
> commit patches yourself?
>
> Dave

Sorry I realize my "OK for trunk?" was quite misleading.
I'm not a maintainer and till now I have now write access so I can't
apply patches myself.

Bests
  Andrea

>> Bests
>>   Andrea
>>
>> 2019-06-09  Andrea Corallo  andrea.corallo@arm.com
>>
>> * libgccjit.c (gcc_jit_context_new_binary_op): Check result_type to
>> be a
>> numeric type.
>>
>>
>> 2019-06-20  Andrea Corallo andrea.corallo@arm.com
>>
>> * jit.dg/test-error-gcc_jit_context_new_binary_op-bad-res-type.c:
>> New testcase.

  reply	other threads:[~2019-06-24 16:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-01  0:00 Andrea Corallo
2019-01-01  0:00 ` David Malcolm
2019-01-01  0:00   ` Andrea Corallo
2019-01-01  0:00     ` David Malcolm
2019-01-01  0:00       ` Andrea Corallo [this message]
2019-01-01  0:00         ` David Malcolm
2019-01-01  0:00           ` Andrea Corallo
2019-01-01  0:00           ` Andrea Corallo
2019-01-01  0:00             ` David Malcolm
2019-01-01  0:00               ` Andrea Corallo
2019-01-01  0:00                 ` David Malcolm
2019-01-01  0:00                   ` Andrea Corallo
2019-01-01  0:00                     ` Andrea Corallo
2019-01-01  0:00                 ` Andrea Corallo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gkrwohbj5x6.fsf@arm.com \
    --to=andrea.corallo@arm.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jit@gcc.gnu.org \
    --cc=nd@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).