Module Name: src Committed By: kamil Date: Wed May 2 18:46:05 UTC 2018
Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/c++: Makefile src/tests/usr.bin/cc: Makefile Added Files: src/tests/usr.bin/c++: t_ubsan_int_add_overflow.sh t_ubsan_int_divzero.sh t_ubsan_int_neg_overflow.sh t_ubsan_int_sub_overflow.sh t_ubsan_vla_out_of_bounds.sh src/tests/usr.bin/cc: t_ubsan_int_add_overflow.sh t_ubsan_int_divzero.sh t_ubsan_int_neg_overflow.sh t_ubsan_int_sub_overflow.sh t_ubsan_vla_out_of_bounds.sh Log Message: Add new ATF Undefined Behavior Sanitizer tests Add new cc and c++ tests to check whether UBSan works. These tests are prepared for GCC (in base) and Clang (with external patches). Enable these tests for all ports by default, just verify whether we are using GCC/Clang or a compatible compiler. Add five equivalent C and C++ tests: - Integer addition overflow - Integer divide by zero - Integer negation overflow - Integer subtraction overflow - VLA out of bounds All tests pass on NetBSD/amd64. Patch submitted by <Harry Pantazis> Minor cleanup by <myself> To generate a diff of this commit: cvs rdiff -u -r1.781 -r1.782 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/c++/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/c++/t_ubsan_int_add_overflow.sh \ src/tests/usr.bin/c++/t_ubsan_int_divzero.sh \ src/tests/usr.bin/c++/t_ubsan_int_neg_overflow.sh \ src/tests/usr.bin/c++/t_ubsan_int_sub_overflow.sh \ src/tests/usr.bin/c++/t_ubsan_vla_out_of_bounds.sh cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/cc/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/cc/t_ubsan_int_add_overflow.sh \ src/tests/usr.bin/cc/t_ubsan_int_divzero.sh \ src/tests/usr.bin/cc/t_ubsan_int_neg_overflow.sh \ src/tests/usr.bin/cc/t_ubsan_int_sub_overflow.sh \ src/tests/usr.bin/cc/t_ubsan_vla_out_of_bounds.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.