Link error when compiling with -fsanitize=undefined
Scott Kostyshak
skostysh at lyx.org
Sat Sep 18 14:34:49 UTC 2021
On Sat, Sep 18, 2021 at 04:29:40PM +0200, Kornel Benko wrote:
> Am Fri, 17 Sep 2021 16:41:09 -0400
> schrieb Scott Kostyshak <skostysh at lyx.org>:
>
> > On Fri, Sep 17, 2021 at 10:22:28PM +0200, Kornel Benko wrote:
> > > Am Fri, 17 Sep 2021 20:24:17 +0200
> > > schrieb Jean-Marc Lasgouttes <lasgouttes at lyx.org>:
> > >
> > > > Le 17/09/2021 à 20:21, Scott Kostyshak a écrit :
> > > > > /usr/include/c++/10/bits/stl_function.h:386:20: runtime error: load of value 128,
> > > > > which is not a valid value for type 'ColorCode' /usr/include/c++/10/tuple:1693:70:
> > > > > runtime error: load of value 128, which is not a valid value for type
> > > > > 'ColorCode' /usr/include/c++/10/bits/stl_function.h:386:20: runtime error: load of
> > > > > value 128, which is not a valid value for type
> > > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:366:35: runtime error:
> > > > > load of value 128, which is not a valid value for type
> > > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:367:39: runtime error:
> > > > > load of value 128, which is not a valid value for type
> > > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:457:17: runtime error:
> > > > > load of value 128, which is not a valid value for type
> > > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:435:10: runtime error:
> > > > > load of value 128, which is not a valid value for type
> > > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:435:31: runtime error:
> > > > > load of value 128, which is not a valid value for type
> > > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:435:55: runtime error:
> > > > > load of value 128, which is not a valid value for type
> > > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:536:13: runtime error:
> > > > > load of value 128, which is not a valid value for type
> > > > > '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
> > > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/MetricsInfo.cpp:179:9: runtime
> > > > > error: load of value 128, which is not a valid value for type
> > > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/support/Changer.h:41:59: runtime
> > > > > error: load of value 128, which is not a valid value for type
> > > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/support/Changer.h:45:56: runtime
> > > > > error: load of value 128, which is not a valid value for type
> > > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:191:9: runtime error:
> > > > > load of value 128, which is not a valid value for type 'ColorCode'
> > > > >
> > > > > I don't have time to study how to fix it, but at least I can note it here in case
> > > > > anyone does.
> > > >
> > > > This seems more interesting indeed. Looks like the same value
> > > > everywhere. I suspect we create synthetic color values in some
> > > > circumstances.
> > > >
> > > > JMarc
> > >
> > > Seems, like an option for sanitize in cmake would be handy.
> > > LYX_OPTION(DEBUG_SANITIZE "Enable sanitize check" OFF GCC)
> > >
> > > ...
> > > if (LYX_DEBUG_SANITIZE)
> > > # some magic statements
> > > endif()
> > >
> > > Kornel
> >
> > That would be nice but might be some work and I don't know if others are interested. I
> > think it's nice because the run-time hit on performance isn't bad. For example, with
> > -fsanitize=undefined, I don't even notice it is slower. With ASAN it is noticeably
> > slower (although still usable as opposed to using LyX with Valgrind).
> >
> > Scott
>
> I tried but failed. The problem is that tex2lyx uses
> libzlibstatic.a, ../../lib/libsupport.a to link with, but these are compiled with
> -fsanitize. So the only way is to define dummy versions as Jean-Marc pointed out.
Thank you for trying, Kornel!
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/20210918/0b29ecd7/attachment.asc>
More information about the lyx-devel
mailing list