[all-commits] [llvm/llvm-project] bae2fb: [compiler-rt][asan][test] Fix lit test config on M...

alvinhochun via All-commits all-commits at lists.llvm.org
Sat Apr 1 10:06:47 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bae2fbaebf2527f1259ac5f5881749d0ce3a8ee7
      https://github.com/llvm/llvm-project/commit/bae2fbaebf2527f1259ac5f5881749d0ce3a8ee7
  Author: Alvin Wong <alvin at alvinhc.com>
  Date:   2023-04-02 (Sun, 02 Apr 2023)

  Changed paths:
    M compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cpp
    M compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cpp
    M compiler-rt/test/asan/TestCases/Windows/beginthreadex.cpp
    M compiler-rt/test/asan/TestCases/Windows/bitfield.cpp
    M compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cpp
    M compiler-rt/test/asan/TestCases/Windows/breakpoint.cpp
    M compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cpp
    M compiler-rt/test/asan/TestCases/Windows/coverage-dll-stdio.cpp
    M compiler-rt/test/asan/TestCases/Windows/crt_initializers.cpp
    M compiler-rt/test/asan/TestCases/Windows/delay_dbghelp.cpp
    M compiler-rt/test/asan/TestCases/Windows/demangled_names.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_aligned_mallocs.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_allocators_sanity.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_and_lib.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_cerr.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_control_c.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_global_dead_strip.c
    M compiler-rt/test/asan/TestCases/Windows/dll_heap_allocation.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_host.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_intercept_memchr.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_intercept_memcpy.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_intercept_memset.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_intercept_strlen.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_large_function.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_malloc_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_malloc_uaf.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_noreturn.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_null_deref.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_poison_unpoison.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_seh.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_stack_use_after_return.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/dll_unload.cpp
    M compiler-rt/test/asan/TestCases/Windows/double_free.cpp
    M compiler-rt/test/asan/TestCases/Windows/double_operator_delete.cpp
    M compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp
    M compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/global_dead_strip.c
    M compiler-rt/test/asan/TestCases/Windows/heapalloc.cpp
    M compiler-rt/test/asan/TestCases/Windows/heapalloc_dll_double_free.cpp
    M compiler-rt/test/asan/TestCases/Windows/heapalloc_dll_unload_realloc_uaf.cpp
    M compiler-rt/test/asan/TestCases/Windows/heapalloc_doublefree.cpp
    M compiler-rt/test/asan/TestCases/Windows/heapalloc_flags_fallback.cpp
    M compiler-rt/test/asan/TestCases/Windows/heapalloc_huge.cpp
    M compiler-rt/test/asan/TestCases/Windows/heapalloc_rtl_transfer.cpp
    M compiler-rt/test/asan/TestCases/Windows/heapalloc_sanity.cpp
    M compiler-rt/test/asan/TestCases/Windows/heapalloc_transfer.cpp
    M compiler-rt/test/asan/TestCases/Windows/heapalloc_uaf.cpp
    M compiler-rt/test/asan/TestCases/Windows/heapalloc_zero_size.cpp
    M compiler-rt/test/asan/TestCases/Windows/heaprealloc.cpp
    M compiler-rt/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cpp
    M compiler-rt/test/asan/TestCases/Windows/heaprealloc_zero_size.cpp
    M compiler-rt/test/asan/TestCases/Windows/hello_world.cpp
    M compiler-rt/test/asan/TestCases/Windows/illegal_instruction.cpp
    M compiler-rt/test/asan/TestCases/Windows/integer_divide_by_zero.cpp
    M compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cpp
    M compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cpp
    M compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cpp
    M compiler-rt/test/asan/TestCases/Windows/interface_symbols_windows.cpp
    M compiler-rt/test/asan/TestCases/Windows/iostream_sbo.cpp
    M compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cpp
    M compiler-rt/test/asan/TestCases/Windows/null_deref_multiple_dlls.cpp
    M compiler-rt/test/asan/TestCases/Windows/oom.cpp
    M compiler-rt/test/asan/TestCases/Windows/operator_array_new_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/operator_array_new_right_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/operator_array_new_uaf.cpp
    M compiler-rt/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp
    M compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cpp
    M compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cpp
    M compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cpp
    M compiler-rt/test/asan/TestCases/Windows/recalloc_sanity.cpp
    M compiler-rt/test/asan/TestCases/Windows/report_globals_reload_dll.cpp
    M compiler-rt/test/asan/TestCases/Windows/report_globals_vs_freelibrary.cpp
    M compiler-rt/test/asan/TestCases/Windows/rtlallocateheap.cpp
    M compiler-rt/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_double_free.cpp
    M compiler-rt/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_realloc.cpp
    M compiler-rt/test/asan/TestCases/Windows/rtlallocateheap_flags_fallback.cpp
    M compiler-rt/test/asan/TestCases/Windows/rtlallocateheap_zero.cpp
    M compiler-rt/test/asan/TestCases/Windows/sanitizer_purge.cpp
    M compiler-rt/test/asan/TestCases/Windows/seh.cpp
    M compiler-rt/test/asan/TestCases/Windows/shadow_conflict_32.cpp
    M compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cpp
    M compiler-rt/test/asan/TestCases/Windows/sse_misalignment.cpp
    M compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cpp
    M compiler-rt/test/asan/TestCases/Windows/stack_use_after_return.cpp
    M compiler-rt/test/asan/TestCases/Windows/symbols_path.cpp
    M compiler-rt/test/asan/TestCases/Windows/thread_simple.cpp
    M compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp
    M compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cpp
    M compiler-rt/test/asan/TestCases/Windows/thread_stress.cpp
    M compiler-rt/test/asan/TestCases/Windows/thread_suspended.cpp
    M compiler-rt/test/asan/TestCases/Windows/tls_init.cpp
    M compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cpp
    M compiler-rt/test/asan/TestCases/Windows/use_after_return_linkage.cpp
    M compiler-rt/test/asan/TestCases/Windows/user-exception.cpp
    M compiler-rt/test/asan/TestCases/Windows/windows_h.cpp
    M compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp
    M compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp
    M compiler-rt/test/asan/lit.cfg.py
    M compiler-rt/test/lit.common.cfg.py

  Log Message:
  -----------
  [compiler-rt][asan][test] Fix lit test config on MinGW

MinGW is GCC-like and does not support clang-cl, so clean up the lit cfg
to reflect that. Also mark all Windows test cases using clang-cl as
UNSUPPORTED for now. We should probably adapt most of these test cases
to use the GCC-like clang driver, but that will be for later.

Differential Revision: https://reviews.llvm.org/D147057


  Commit: 985580d7c03c3d0790706089d1f526094dba92ae
      https://github.com/llvm/llvm-project/commit/985580d7c03c3d0790706089d1f526094dba92ae
  Author: Alvin Wong <alvin at alvinhc.com>
  Date:   2023-04-02 (Sun, 02 Apr 2023)

  Changed paths:
    M compiler-rt/test/asan/TestCases/alloca_big_alignment.cpp
    M compiler-rt/test/asan/TestCases/alloca_detect_custom_size_.cpp
    M compiler-rt/test/asan/TestCases/alloca_instruments_all_paddings.cpp
    M compiler-rt/test/asan/TestCases/alloca_overflow_partial.cpp
    M compiler-rt/test/asan/TestCases/alloca_overflow_right.cpp
    M compiler-rt/test/asan/TestCases/alloca_safe_access.cpp
    M compiler-rt/test/asan/TestCases/alloca_underflow_left.cpp

  Log Message:
  -----------
  [asan][test] Fix `TestCases/alloca_*` ptr-to-long cast on Windows

64-bit Windows uses 32-bit long so these casts fail to compile with the
error "cast from pointer to smaller type". Change to instead use
uintptr_t like other tests.

Differential Revision: https://reviews.llvm.org/D147232


  Commit: 5888a47914f44ffaf102fcb7afd3500706fe753f
      https://github.com/llvm/llvm-project/commit/5888a47914f44ffaf102fcb7afd3500706fe753f
  Author: Alvin Wong <alvin at alvinhc.com>
  Date:   2023-04-02 (Sun, 02 Apr 2023)

  Changed paths:
    M compiler-rt/lib/asan/tests/asan_str_test.cpp
    M compiler-rt/lib/asan/tests/asan_test.cpp
    M compiler-rt/lib/sanitizer_common/tests/sanitizer_test_utils.h
    M compiler-rt/test/asan/TestCases/Windows/coverage-basic.cpp
    M compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp
    M compiler-rt/test/asan/TestCases/atexit_stats.cpp
    M compiler-rt/test/asan/TestCases/atoll_strict.c
    M compiler-rt/test/asan/TestCases/frexpl_interceptor.cpp
    M compiler-rt/test/asan/TestCases/global-location.cpp
    M compiler-rt/test/asan/TestCases/heavy_uar_test.cpp
    M compiler-rt/test/asan/TestCases/init-order-atexit.cpp
    M compiler-rt/test/asan/TestCases/printf-2.c
    M compiler-rt/test/asan/TestCases/printf-3.c
    M compiler-rt/test/asan/TestCases/printf-5.c
    M compiler-rt/test/asan/TestCases/strcasestr-1.c
    M compiler-rt/test/asan/TestCases/strcasestr-2.c
    M compiler-rt/test/asan/TestCases/strcasestr_strict.c
    M compiler-rt/test/asan/TestCases/strncasecmp_strict.c
    M compiler-rt/test/asan/TestCases/strtoll_strict.c
    M compiler-rt/test/asan/TestCases/time_interceptor.cpp

  Log Message:
  -----------
  [asan][test] Fix tests or mark XFAIL for MinGW target

After this change, `check-asan-dynamic` should pass on x86_64 MinGW
target, using the llvm-mingw toolchain.

The following is a list of issues fixed:

* `asan_str_test.cpp`: Exclude unintercepted functions on MinGW.
* `asan_test.cpp`: Work around regex limitation of gtest on Windows,
  which only affects MinGW target because `long double` has different
  size to `double`.
* `TestCases/Windows/report_after_syminitialize.cpp`: Added  build
  command specifically for MinGW.
* Other tests: Mark XFAIL for various reasons. Some of them need
  further investigation.

Differential Revision: https://reviews.llvm.org/D147059


Compare: https://github.com/llvm/llvm-project/compare/88e5df0e4392...5888a47914f4


More information about the All-commits mailing list