fsanitize: member access within null pointer
Pavel Sanda
sanda at lyx.org
Thu Dec 16 14:38:41 UTC 2021
On Thu, Dec 16, 2021 at 01:47:50PM +0100, Kornel Benko wrote:
> Am Thu, 16 Dec 2021 13:38:43 +0100
> schrieb Pavel Sanda <sanda at lyx.org>:
>
> > On Tue, Dec 07, 2021 at 10:20:02PM -0500, Scott Kostyshak wrote:
> > > Compiling master with Clang and fsanitize, I get the following when
> > > LyX starts up (without doing anything else):
> > >
> > > /home/scott/lyxbuilds/master/repo/src/support/socktools.cpp:114:56: runtime error:
> > > member access within null pointer of type 'struct sockaddr_un'
> > >
> > > Can anyone take a look?
> >
> > Does changing sockaddr -> sockaddr_un in the critical line changes anything? P
>
> /usr2/src/lyx/lyx-git/src/support/socktools.cpp:114:19: error: cannot initialize a
> parameter of type 'const struct sockaddr *' with an rvalue of type 'sockaddr_un *'
> if ((::bind (fd, reinterpret_cast<sockaddr_un *>(&addr), SUN_LEN(&addr))) == -1) {
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/x86_64-linux-gnu/sys/socket.h:112:49: note: passing argument to parameter
> '__addr' here extern int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len)
Can you setup breakpoint on the critical line and display the content of addr? P
More information about the lyx-devel
mailing list