[Mesa-dev] Let's enable _GLIBCXX_ASSERTIONS=1 on mesa debug builds
timur.kristof at gmail.com
Fri Sep 10 21:19:28 UTC 2021
Matt Turner <mattst88 at gmail.com> ezt írta (időpont: 2021. szept. 10., P
> On Fri, Sep 10, 2021 at 10:20 AM Timur Kristóf <timur.kristof at gmail.com>
> > Hi,
> > We've been recently working on tracking down some "mysterious" crashes
> > that some users experienced on distro builds of mesa but we couldn't
> > reproduce locally, until we found out about _GLIBCXX_ASSERTIONS=1 which
> > seems to be not enabled by default in mesa, but is enabled by a lot of
> > distros.
> > I realize that enabling it by default on all mesa builds would have
> > performance implications, so I propose to just enable it by default in
> > mesa debug builds.
> > What do you think? Would this be okay with the mesa community?
> I've never heard of this before. According to the documentation  it is:
> > _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.
> Seems reasonable to enable it for debug builds if we're using C++
> features in Mesa that it covers.
While at it, do you think we should also use any of the other similar
macros from the doc?
I think _GLIBCXX_DEBUG and _GLIBCXX_SANITIZE_VECTOR look particularly
>  https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mesa-dev