Patch 8.2.1567
Problem: No example to use ubsan with clang.
Solution: Add example commands. (Dominique Pellé, issue #6811)
Files: src/Makefile
*** ../vim-8.2.1566/src/Makefile 2020-08-30 18:11:49.597111423 +0200
--- src/Makefile 2020-09-02 19:20:57.209124057 +0200
***************
*** 610,617 ****
# Use this with GCC to check for mistakes, unused arguments, etc.
# Note: If you use -Wextra and get warnings in GTK code about function
! # parameters, you can add -Wno-cast-function-type
#CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -Wno-cast-function-type -Wno-deprecated-declarations -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
# Add -Wpedantic to find // comments and other C99 constructs.
# Better disable Perl and Python to avoid a lot of warnings.
#CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wpedantic -Wunreachable-code -Wunused-result -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
--- 610,618 ----
# Use this with GCC to check for mistakes, unused arguments, etc.
# Note: If you use -Wextra and get warnings in GTK code about function
! # parameters, you can add -Wno-cast-function-type (but not with clang)
#CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -Wno-cast-function-type -Wno-deprecated-declarations -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
+ #CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -Wno-deprecated-declarations -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
# Add -Wpedantic to find // comments and other C99 constructs.
# Better disable Perl and Python to avoid a lot of warnings.
#CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wpedantic -Wunreachable-code -Wunused-result -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
***************
*** 690,697 ****
# Uncomment one of the next two lines to compile Vim with the
! # address sanitizer (asan) or with the undefined sanitizer. Works with gcc and
! # clang. May make Vim twice as slow. Errors reported on stderr.
# More at:
https://code.google.com/p/address-sanitizer/
# Useful environment variables:
# $ export ASAN_OPTIONS="print_stacktrace=1 log_path=asan"
--- 691,698 ----
# Uncomment one of the next two lines to compile Vim with the
! # address sanitizer (asan) or with the undefined sanitizer. Works with gcc.
! # May make Vim twice as slow. Errors are reported on stderr.
# More at:
https://code.google.com/p/address-sanitizer/
# Useful environment variables:
# $ export ASAN_OPTIONS="print_stacktrace=1 log_path=asan"
***************
*** 699,704 ****
--- 700,712 ----
# When running tests output can be found in testdir/asan.*
#SANITIZER_CFLAGS = -g -O0 -fsanitize=address -fno-omit-frame-pointer
#SANITIZER_CFLAGS = -g -O0 -fsanitize=undefined -fno-omit-frame-pointer
+
+ # Similarly when compiling with clang and using ubsan.
+ # $ export UBSAN_OPTIONS="print_stacktrace=1 log_path=ubsan"
+ # $ export LSAN_OPTIONS="suppressions=`pwd`/testdir/lsan-suppress.txt"
+ # When running tests output can be found in testdir/ubsan.*
+ #SANITIZER_CFLAGS = -g -O0 -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer
+
SANITIZER_LIBS = $(SANITIZER_CFLAGS)
# MEMORY LEAK DETECTION
*** ../vim-8.2.1566/src/version.c 2020-09-02 17:08:55.956296752 +0200
--- src/version.c 2020-09-02 19:22:42.784834186 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1567,
/**/
--
GUARD #1: What -- a swallow carrying a coconut?
ARTHUR: It could grip it by the husk!
GUARD #1: It's not a question of where he grips it! It's a simple question
of weight ratios! A five ounce bird could not carry a 1 pound
coconut.
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///