-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some fixes for compiling with the -D_GLIBCXX_DEBUG
flag.
#1176
Conversation
-D_GLIBCXX_DEBUG=1
flag.-D_GLIBCXX_DEBUG=1
flag.
-D_GLIBCXX_DEBUG=1
flag.-D_GLIBCXX_DEBUG
flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dislike the reinterpret_cast
on std:;array
s and it must be addressed before I change my review.
We also need to discuss where we set the compiler options. I am fine with your approach, but there could be a reason why we opted for our own compiler flags.
Edit: I just checked your link, and they state that std::array
should work fine for GCC
>= 11. Maybe we can add an alias to __gnu_debug::array
for older GCC?
Prior to GCC 11 a debug version of std::array was available as __gnu_debug::array in the header <debug/array>. Because array::iterator is just a pointer, the debug array can't check iterator operations, it can only check direct accesses to the container. Starting with GCC 11 all the debug capabilities are available in std::array, without needing a separate type, so __gnu_debug::array is just an alias for std::array. That alias is deprecated and may be removed in a future release.
--- GCC debug mode
3a3c752
to
e787900
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
LGTM too. Feel free to approve and merge when you are ready. |
We had three small bugs that need to be fixed, and I'll try to reduce the test runtime, but otherwise it's ready, yes |
Co-authored-by: Tobias Ribizel <ribizel@kit.edu>
this only occurred spuriously, so I set a random seed that caused it More precisely, we read beyond the last begin entry, which is uninitialized.
8f9e64d
to
06355c9
Compare
This PR adds some recommended fixes needed to compile by adding the
-D_GLIBCXX_DEBUG
flag to all the source files. More details about the flag and its purpose can be found hereSome issues:
Not sure if we want to have this for 1.5.0.
Fixes #1143