mirror of
https://github.com/neovim/neovim.git
synced 2026-07-16 22:21:30 +00:00
Merge pull request #34495 from bfredl/debwithrelinfo
fix(build): disable problematic marktree assert in RelWithDebInfo builds
This commit is contained in:
@@ -156,8 +156,8 @@ set(NVIM_API_PRERELEASE true)
|
||||
|
||||
# We _want_ assertions in RelWithDebInfo build-type.
|
||||
if(CMAKE_C_FLAGS_RELWITHDEBINFO MATCHES DNDEBUG)
|
||||
string(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
string(REPLACE "/DNDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
string(REPLACE "-DNDEBUG" "-DRELDEBUG" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
string(REPLACE "/DNDEBUG" "/DRELDEBUG" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
string(REPLACE " " " " CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") # Remove duplicate whitespace
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1068,7 +1068,10 @@ void buf_signcols_count_range(buf_T *buf, int row1, int row2, int add, TriState
|
||||
int prevwidth = MIN(SIGN_SHOW_MAX, count[i] - add);
|
||||
if (clear != kNone && prevwidth > 0) {
|
||||
buf->b_signcols.count[prevwidth - 1]--;
|
||||
#ifndef RELDEBUG
|
||||
// TODO(bfredl): correct marktree splicing so that this doesn't fail
|
||||
assert(buf->b_signcols.count[prevwidth - 1] >= 0);
|
||||
#endif
|
||||
}
|
||||
int width = MIN(SIGN_SHOW_MAX, count[i]);
|
||||
if (clear != kTrue && width > 0) {
|
||||
|
||||
@@ -372,7 +372,13 @@ static void unintersect_node(MarkTree *b, MTNode *x, uint64_t id, bool strict)
|
||||
}
|
||||
}
|
||||
if (strict) {
|
||||
#ifndef RELDEBUG
|
||||
// TODO(bfredl): This assert has been seen to fail for end users
|
||||
// using RelWithDebInfo builds. While indicating an invalid state for
|
||||
// the marktree, this error doesn't need to be fatal. The assert still
|
||||
// needs to present in Debug builds to be able to detect regressions in tests.
|
||||
assert(seen);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (seen) {
|
||||
|
||||
Reference in New Issue
Block a user