[PATCH][gcc] libgccjit: check result_type in gcc_jit_context_new_binary_op
Mon Jun 24 16:37:00 GMT 2019
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.
>> I've added a simple testcase as requested, here I'm trying to do
>> 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_function_new_block, and
> it just needs the types and the gcc_jit_context_new_binary_op call.
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?
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.
>> 2019-06-09 Andrea Corallo firstname.lastname@example.org
>> * libgccjit.c (gcc_jit_context_new_binary_op): Check result_type to
>> be a
>> numeric type.
>> 2019-06-20 Andrea Corallo email@example.com
>> * jit.dg/test-error-gcc_jit_context_new_binary_op-bad-res-type.c:
>> New testcase.
More information about the Gcc-patches