fsanitize: member access within null pointer
Scott Kostyshak
skostysh at lyx.org
Mon Dec 27 14:48:38 UTC 2021
On Mon, Dec 27, 2021 at 11:32:49AM +0100, Kornel Benko wrote:
> Am Mon, 27 Dec 2021 10:41:49 +0100
> schrieb Pavel Sanda <sanda at lyx.org>:
>
> > On Sun, Dec 26, 2021 at 09:48:11AM +0100, Kornel Benko wrote:
> > > > I guess clang is not happy with (((struct sockaddr_un *) 0)->sun_path)
> > > >
> > > > Our own code has:
> > > > #if !defined(SUN_LEN)
> > > > #define SUN_LEN(su) \
> > > > (sizeof (*(su)) - sizeof ((su)->sun_path) + strlen((su)->sun_path))
> > > > #endif
> > >
> > > That was a good guess! With the attached change the message does not appear anymore.
> >
> > Apart from that error message is there some functional problem for LyX?
>
> Not that I am aware of. It manifests only at runtime with sanitize + clang ...
Neither am I.
> > Otherwise I would leave things as they are, it's not our code and sooner
> > or later someone will report this to libc maintainers.
>
> I think it is unlikely (who else is using sanitize + clang with this code?)
Me, but I'm not planning to report either.
> > (Or it could be
> > you? :)
>
> :(
>
> > Or add a comment once we forget...
>
> Maybe some native English speaker would fit here better.
A comment in LyX's code? Something just like the following?
// Using Clang and fsanitize suggests there is an issue here but we do
// not understand the code enough to change it and we are not aware of
// how to trigger a crash or other issue while using LyX, so we leave
// it as is. For ML discussion, see here:
// https://www.mail-archive.com/search?l=mid&q=20211227113249.53bf5a63%40admin1-desktop
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20211227/bd1843fa/attachment.asc>
More information about the lyx-devel
mailing list