[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: san_ignore_object not found at link time
From: |
Eli Zaretskii |
Subject: |
Re: san_ignore_object not found at link time |
Date: |
Sat, 01 Aug 2020 21:32:26 +0300 |
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Sat, 1 Aug 2020 20:29:29 +0200
> Cc: Alan Third <alan@idiocy.org>, raman <raman@google.com>,
> Emacs developers <emacs-devel@gnu.org>
>
> > alloc.c: In function 'mark_maybe_object':
> > alloc.c:4641:14: warning: cast to pointer from integer of different size
> > [-Wint-to-pointer-cast]
> > 4641 | void *po = (char *) ((intptr_t) (char *) XLP (obj)
> > | ^
> >
> > This is a 32-bit build --with-wide-int, in case it matters, where
> > EMACS_INT is a 64-bit data type.
>
> This is due to the unrelated commit a2323c7ccb. (I just happened to
> push both commits at the same time.)
> It looks like LISP_WORD_TAG in a wide int build is a 64-bit number, so
> that the entire expression gets widened to a 64-bit number. However,
> since it's cast back to a pointer, the value has to fit in 32 bits.
The pointer is there, you just cannot safely extract it by casting to
a narrower data type. You need to explicitly mask the MSBs by
shifting or some other bit fiddling.
- Re: san_ignore_object not found at link time, (continued)
- Re: san_ignore_object not found at link time, Eli Zaretskii, 2020/08/01
- Re: san_ignore_object not found at link time, Philipp Stephani, 2020/08/01
- Re: san_ignore_object not found at link time, T.V Raman, 2020/08/01
- Re: san_ignore_object not found at link time, Alan Third, 2020/08/01
- Re: san_ignore_object not found at link time, Philipp Stephani, 2020/08/01
- Re: san_ignore_object not found at link time, Eli Zaretskii, 2020/08/01
- Re: san_ignore_object not found at link time, Eli Zaretskii, 2020/08/01
- Re: san_ignore_object not found at link time, Philipp Stephani, 2020/08/01
- Re: san_ignore_object not found at link time, Andreas Schwab, 2020/08/01
- Re: san_ignore_object not found at link time, Philipp Stephani, 2020/08/01
- Re: san_ignore_object not found at link time,
Eli Zaretskii <=
- Re: san_ignore_object not found at link time, Philipp Stephani, 2020/08/01
- Re: san_ignore_object not found at link time, Philipp Stephani, 2020/08/01
- Re: san_ignore_object not found at link time, Philipp Stephani, 2020/08/01
- Re: san_ignore_object not found at link time, Eli Zaretskii, 2020/08/01
- Re: san_ignore_object not found at link time, Eli Zaretskii, 2020/08/01
- Re: san_ignore_object not found at link time, Philipp Stephani, 2020/08/01
- Re: san_ignore_object not found at link time, Eli Zaretskii, 2020/08/02
- Re: san_ignore_object not found at link time, T.V Raman, 2020/08/01
- Re: san_ignore_object not found at link time, Alan Third, 2020/08/01