Noticing runtime error in socktools.cpp
Kornel Benko
kornel at lyx.org
Tue Oct 22 12:00:28 UTC 2024
Am Tue, 22 Oct 2024 13:20:01 +0200
schrieb Jean-Marc Lasgouttes <lasgouttes at lyx.org>:
> Le 22/10/2024 à 12:27, Scott Kostyshak a écrit :
> > On Wed, Sep 18, 2024 at 10:06:58AM GMT, Kornel Benko wrote:
> >> Lyx compiled with -fsanitize=undefined gives this at start:
> >>
> >> /usr2/src/lyx/lyx-git/src/support/socktools.cpp:121:56: runtime error: member access
> >> within null pointer of type 'struct sockaddr_un' #0 0x5570c33ba6c8 in
> >> lyx::support::socktools::listen(lyx::support::FileName const&, int)
> >> /usr2/src/lyx/lyx-git/src/support/socktools.cpp:121:56 #1 0x5570c1975907 in
> >> lyx::ServerSocket::ServerSocket(lyx::support::FileName const&)
> >> /usr2/src/lyx/lyx-git/src/ServerSocket.cpp:55:8 #2 0x5570c17fe5ee in
> >> lyx::LyX::exec(int&, char**) /usr2/src/lyx/lyx-git/src/LyX.cpp:370:32 #3
> >> 0x5570c1c6a4ba in main /usr2/src/lyx/lyx-git/src/main.cpp:55:26 #4 0x7f91a048bd8f in
> >> __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #5
> >> 0x7f91a048be3f in __libc_start_main csu/../csu/libc-start.c:392:3 #6 0x5570c112b154
> >> in _start
> >> (/usr9/BUILD/Mint21/BuildLyxGitQt6.2.4local-clang15.0.7/bin/lyx2.5+0x28fe154)
> >> (BuildId: 518d7aff388c7943507dd4632cba39cb3ae876cb)
> >>
> >> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
> >> /usr2/src/lyx/lyx-git/src/support/socktools.cpp:121:56 in
> >
> > I have been wanting to try to reproduce this, but I always have to change a few
> > things around so that compiling with -fsanitize=undefined works for me.
>
> I took a look at that, but this code is out of my breadth.
>
> JMarc
>
It is not compilation which gives the error output. Start the debug-version of lyx from
the build directory:
$ ./bin/lyx2.5
/usr2/src/lyx/lyx-git/src/support/socktools.cpp:121:56: runtime error: member access
within null pointer of type 'struct sockaddr_un' SUMMARY: UndefinedBehaviorSanitizer:
undefined-behavior /usr2/src/lyx/lyx-git/src/support/socktools.cpp:121:56 in
Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20241022/2a8c1bac/attachment.sig>
More information about the lyx-devel
mailing list