-
-
Notifications
You must be signed in to change notification settings - Fork 172
Replace invalid vector.end dereference with raw pointer access #2471
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
Conversation
@kcgen maybe we should add |
@LowLevelMahn update the commit message according to rule 5, please. |
so "replaces" becomes "Replace"? |
does the CI also start dosbox (its only triggered at runtime)? |
Yes - seems like we should have this in our debug builds? We should catch these straight away in a debug (and assert-enabled) builds. |
there is also _GLIBCXX_SANITIZE_VECTOR (see: https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html)
and the libc++ from the LLVM project also got sanitizing for std::string, std::vector, std::deque and some others but i didn't tested them |
Looks good, thanks @LowLevelMahn ! |
the MSVC STL asserts on end dereference in Debug mode, that happens if there is no data left to copy (size == 0)
the assert happens under Linux only with -D_GLIBCXX_DEBUG