2.4.0 plan for #12215 [LyX crashes with async processes (Qt6 only)] ?
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Wed Nov 23 14:48:37 UTC 2022
Le 23/11/2022 à 04:13, Richard Kimberly Heck a écrit :
> In general, from the LyX bug report, it looks like they're building LyX
> but not Qt with debug iterators enabled.
>
> That is a bad idea. libstdc++ debug mode breaks ABI. I don't think we
> ever return any QMap in Qt across its library boundary, but if we did,
> they couldn't use it.
> So, maybe the problem is very specific to --enable-stdlib-debug and has
> to do with the way we use external libraries.
It might be time to dump debug iterators and use the less annoying but
less powerful _GLIBCXX_ASSERTIONS, which only does basic index checking.
It seems to me that most interesting errors found by stdlib-debug in the
past were in this category.
It was introduced in gcc 6 and the release notes say:
"Assertions to check function preconditions can be enabled by defining
the _GLIBCXX_ASSERTIONS macro. The initial set of assertions are a
subset of the checks enabled by the Debug Mode, but without the ABI
changes and changes to algorithmic complexity that are caused by
enabling the full Debug Mode. "
As far as I understand, this avoids all compatibility issues. I put
documentation below; currently we use _GLIBCXX_DEBUG and
_GLIBCXX_DEBUG_PEDANTIC.
JMarc
_GLIBCXX_ASSERTIONS
Undefined by default. When defined, enables extra error checking in
the form of precondition assertions, such as bounds checking in strings
and null pointer checks when dereferencing smart pointers.
_GLIBCXX_DEBUG
Undefined by default. When defined, compiles user code using the
debug mode. When defined, _GLIBCXX_ASSERTIONS is defined automatically,
so all the assertions enabled by that macro are also enabled in debug
mode. [*]
_GLIBCXX_DEBUG_PEDANTIC
Undefined by default. When defined while compiling with the debug
mode, makes the debug mode extremely picky by making the use of
libstdc++ extensions and libstdc++-specific behavior into errors.
[*] https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html
More information about the lyx-devel
mailing list