[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun
From: |
Pip Cet |
Subject: |
bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun |
Date: |
Tue, 2 Mar 2021 14:02:55 +0000 |
On Tue, Mar 2, 2021 at 1:28 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Pip Cet <pipcet@gmail.com>
> > Date: Tue, 2 Mar 2021 09:16:12 +0000
> > Cc: 46824@debbugs.gnu.org, Aaron Jensen <aaronjensen@gmail.com>
> >
> > + gcc_jit_param *params[] =
> > + {
> > + gcc_jit_context_new_param (comp.ctxt, NULL, comp.void_ptr_type,
> > "buf"),
> > + };
>
> Nitpicking: the braces here should be in column zero.
How about we compromise and put them in column two rather than four or zero? :-)
(I hope that's what you meant).
I was going to apologize for apparently messing up my cc-mode setup
here, but emacs -Q also insists on the incorrect brace placement. We
might want to fix that somehow for those Emacs developers who use this
"Emacs" thing.
> > + /* Don't call setjmp through a function pointer (Bug#46824) */
> > + return gcc_jit_context_new_call (comp.ctxt,
> > + NULL,
> > + gcc_jit_context_new_function
> > + (comp.ctxt, NULL,
> > GCC_JIT_FUNCTION_IMPORTED,
> > + comp.int_type, STR (SETJMP_NAME),
> > + ARRAYELTS (params), params,
> > + false),
> > + 1,
> > + args);
>
> Another nit: in cases like this one I find this style more readable:
>
> return gcc_jit_context_new_call (comp.ctxt, NULL,
> gcc_jit_context_new_function (comp.ctxt,
> NULL,
>
> GCC_JIT_FUNCTION_IMPORTED,
> ...
>
> IOW, avoid having the function's name and its arguments on separate
> lines, as I find that harder to read.
>
> Or maybe even this:
>
> gcc_jit_rvalue *val =
> gcc_jit_context_new_call (comp.ctxt, NULL,
> gcc_jit_context_new_function (comp.ctxt, NULL,
>
> GCC_JIT_FUNCTION_IMPORTED,
> ...),
> 1, args);
> return val;
I've decided on the attached, if it's okay.
> Thanks.
Thank you!
0001-Don-t-call-_setjmp-through-a-function-pointer-Bug-46.patch
Description: Text Data
- bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun, Andrea Corallo, 2021/03/01
- bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun, Pip Cet, 2021/03/01
- bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun, Andrea Corallo, 2021/03/01
- bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun, Pip Cet, 2021/03/02
- bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun, Andrea Corallo, 2021/03/02
- bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun, Eli Zaretskii, 2021/03/02
- bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun,
Pip Cet <=
- bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun, Eli Zaretskii, 2021/03/02
- bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun, Eli Zaretskii, 2021/03/02
- bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun, Andrea Corallo, 2021/03/03
- bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun, Pip Cet, 2021/03/04
- bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun, Andrea Corallo, 2021/03/04