mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -04:00
patch 8.2.2424: some tests are known to cause an error with ASAN
Problem: Some tests are known to cause an error with ASAN. Solution: Add CheckNotAsan.
This commit is contained in:
@@ -183,4 +183,12 @@ func s:CheckIPv6Loopback()
|
|||||||
return v:false
|
return v:false
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Command to check for not running under ASAN
|
||||||
|
command CheckNotAsan call CheckNotAsan()
|
||||||
|
func CheckNotAsan()
|
||||||
|
if execute('version') =~# '-fsanitize=[a-z,]*\<address\>'
|
||||||
|
throw 'Skipped: does not work with ASAN'
|
||||||
|
endif
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -207,6 +207,9 @@ func Test_ex_mode_with_global()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_ex_mode_count_overflow()
|
func Test_ex_mode_count_overflow()
|
||||||
|
" The multiplication causes an integer overflow
|
||||||
|
CheckNotAsan
|
||||||
|
|
||||||
" this used to cause a crash
|
" this used to cause a crash
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
call feedkeys("\<Esc>Q\<CR>")
|
call feedkeys("\<Esc>Q\<CR>")
|
||||||
|
@@ -562,27 +562,33 @@ func Test_completefunc_error()
|
|||||||
call setline(1, ['', 'abcd', ''])
|
call setline(1, ['', 'abcd', ''])
|
||||||
call assert_fails('exe "normal 2G$a\<C-X>\<C-U>"', 'E578:')
|
call assert_fails('exe "normal 2G$a\<C-X>\<C-U>"', 'E578:')
|
||||||
|
|
||||||
" Jump to a different window from the complete function
|
|
||||||
" TODO: The following test causes an ASAN failure. Once this issue is
|
|
||||||
" addressed, enable the following test.
|
|
||||||
"func! CompleteFunc(findstart, base)
|
|
||||||
" if a:findstart == 1
|
|
||||||
" return col('.') - 1
|
|
||||||
" endif
|
|
||||||
" wincmd p
|
|
||||||
" return ['a', 'b']
|
|
||||||
"endfunc
|
|
||||||
"set completefunc=CompleteFunc
|
|
||||||
"new
|
|
||||||
"call assert_fails('exe "normal a\<C-X>\<C-U>"', 'E839:')
|
|
||||||
"close!
|
|
||||||
|
|
||||||
set completefunc&
|
set completefunc&
|
||||||
delfunc CompleteFunc
|
delfunc CompleteFunc
|
||||||
delfunc CompleteFunc2
|
delfunc CompleteFunc2
|
||||||
close!
|
close!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_completefunc_error_not_asan()
|
||||||
|
" The following test causes an ASAN failure.
|
||||||
|
CheckNotAsan
|
||||||
|
|
||||||
|
" Jump to a different window from the complete function
|
||||||
|
func! CompleteFunc(findstart, base)
|
||||||
|
if a:findstart == 1
|
||||||
|
return col('.') - 1
|
||||||
|
endif
|
||||||
|
wincmd p
|
||||||
|
return ['a', 'b']
|
||||||
|
endfunc
|
||||||
|
set completefunc=CompleteFunc
|
||||||
|
new
|
||||||
|
call assert_fails('exe "normal a\<C-X>\<C-U>"', 'E839:')
|
||||||
|
close!
|
||||||
|
|
||||||
|
set completefunc&
|
||||||
|
delfunc CompleteFunc
|
||||||
|
endfunc
|
||||||
|
|
||||||
" Test for returning non-string values from 'completefunc'
|
" Test for returning non-string values from 'completefunc'
|
||||||
func Test_completefunc_invalid_data()
|
func Test_completefunc_invalid_data()
|
||||||
new
|
new
|
||||||
|
@@ -4,11 +4,9 @@ source check.vim
|
|||||||
CheckFeature terminal
|
CheckFeature terminal
|
||||||
CheckNotGui
|
CheckNotGui
|
||||||
|
|
||||||
if execute('version') =~# '-fsanitize=[a-z,]*\<address\>'
|
" Skip tests on Travis CI ASAN build because it's difficult to estimate memory
|
||||||
" Skip tests on Travis CI ASAN build because it's difficult to estimate
|
" usage.
|
||||||
" memory usage.
|
CheckNotAsan
|
||||||
throw 'Skipped: does not work with ASAN'
|
|
||||||
endif
|
|
||||||
|
|
||||||
source shared.vim
|
source shared.vim
|
||||||
|
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2424,
|
||||||
/**/
|
/**/
|
||||||
2423,
|
2423,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user