emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature/asan-gc-poisoning aa9ca2c1493 2/2: src/alloc.c: Fix incorrec


From: Po Lu
Subject: Re: feature/asan-gc-poisoning aa9ca2c1493 2/2: src/alloc.c: Fix incorrect pointer arithmetic.
Date: Mon, 05 Dec 2022 09:13:59 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Vibhav Pant <vibhavp@gmail.com> writes:

> branch: feature/asan-gc-poisoning
> commit aa9ca2c1493f1cd9d50698747fd054b1be53dc95
> Author: Vibhav Pant <vibhavp@gmail.com>
> Commit: Vibhav Pant <vibhavp@gmail.com>
>
>     src/alloc.c: Fix incorrect pointer arithmetic.
>     
>     * src/alloc.c (live_float_holding): Use parenthesis around the
>     pointer arithmetic expression to untag 'cp' correctly.
> ---
>  src/alloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/alloc.c b/src/alloc.c
> index 31108837e5a..6b8a4cdcc02 100644
> --- a/src/alloc.c
> +++ b/src/alloc.c
> @@ -5104,7 +5104,7 @@ live_float_holding (struct mem_node *m, void *p)
>         && (b != float_block
>             || offset / sizeof b->floats[0] < float_block_index))
>       {
> -       struct Lisp_Float *f = (struct Lisp_Float *) cp - off;
> +       struct Lisp_Float *f = (struct Lisp_Float *) (cp - off);
>  #if GC_ASAN_POISON_OBJECTS
>         if (__asan_region_is_poisoned (f, sizeof (*f)))
>           return NULL;

This is a problem on master and emacs-29 too, right?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]