patch 8.0.0307: asan detects a memory error when EXITFREE is defined
Problem: Asan detects a memory error when EXITFREE is defined. (Dominique
Pelle)
Solution: In getvcol() check for ml_get_buf() returning an empty string.
Also skip adjusting the scroll position. Set "exiting" in
mch_exit() for all systems.
diff --git a/src/window.c b/src/window.c
index ee5f7aa..6b7bd35 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5708,7 +5708,10 @@
wp->w_height = height;
wp->w_skipcol = 0;
- scroll_to_fraction(wp, prev_height);
+ /* There is no point in adjusting the scroll position when exiting. Some
+ * values might be invalid. */
+ if (!exiting)
+ scroll_to_fraction(wp, prev_height);
}
void