Link error when compiling with -fsanitize=undefined
Scott Kostyshak
skostysh at lyx.org
Mon Sep 20 00:19:15 UTC 2021
On Sun, Sep 19, 2021 at 08:37:16PM +0200, Kornel Benko wrote:
> Am Sun, 19 Sep 2021 14:15:21 -0400
> schrieb Scott Kostyshak <skostysh at lyx.org>:
>
> > On Sun, Sep 19, 2021 at 02:00:33PM +0200, Kornel Benko wrote:
> > > Am Sun, 19 Sep 2021 07:45:19 -0400
> > > schrieb Scott Kostyshak <skostysh at lyx.org>:
> > >
> > > > > > > So inserting this include cured the compilation for me.
> > > > > >
> > > > > > That's great you figured it out and it doesn't add too much complexity to the
> > > > > > code. Are you sure it ended up using the -fsanitize=undefined flag ? If you do
> > > > > >
> > > > > > ldd build-dir/bin/lyx | grep ubsan
> > > > > >
> > > > > > Does it show up?
> > > > > >
> > > > > > Scott
> > > > >
> > > > > libubsan.so.1 => /usr/lib/x86_64-linux-gnu/libubsan.so.1
> > > > > (0x00007f49cdfd2000)
> > > >
> > > > Great, I will experiment next week with it.
> > > >
> > > > Thank you,
> > > >
> > > > Scott
> > > >
> > >
> > > BTW, how got you the output showing errors? My lyx does not print any error messages.
> > > (I mean:
> > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/MetricsInfo.cpp:174:6: runtime
> > > error: load of value 128, which is not a valid value for type
> > > ...
> > > )
> >
> > It seems that it is triggered with a lot of branches (or perhaps more generally any
> > different kind of insets?). Attached is an LFUN sequence that reproduces it. Does it
> > trigger the error for you?
> >
> > Scott
>
> Not on empty document.
For me it works on an empty document. I do use a default.lyx document (this is what saves when you click on "save class defaults"), but I can reproduce if I remove that template. I attach both MWEs; there's not much difference between them. For me, it is sufficient to just open them and I get the messages in the terminal.
Not sure if it's relevant, but perhaps it could be differences with GCC version:
g++ --version
g++ (Ubuntu 10.3.0-1ubuntu1) 10.3.0
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mwe.lyx
Type: application/x-lyx
Size: 13767 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210919/3b32735d/attachment-0002.lyx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mwe2.lyx
Type: application/x-lyx
Size: 13770 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210919/3b32735d/attachment-0003.lyx>
-------------- 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/20210919/3b32735d/attachment-0001.asc>
More information about the lyx-devel
mailing list