onnxruntime/tools/ci_build/github/windows
Changming Sun 0e8d4c3d21
Enable Address Sanitizer in CI (#19073)
### Description
1. Add two build jobs for enabling Address Sanitizer in CI. One for
Windows CPU, One for Linux CPU.
2. Set default compiler flags/linker flags in build.py for normal
Windows/Linux/MacOS build. This can help control compiler flags in a
more centralized way.
3. All Windows binaries in our official packages will be built with
"/PROFILE" flag. Symbols of onnxruntime.dll can be found at [Microsoft
public symbol
server](https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/microsoft-public-symbols).

Limitations:
1. On Linux Address Sanitizer ignores RPATH settings in ELF binaries.
Therefore once Address Sanitizer is enabled, before running tests we
need to manually set LD_LIBRARY_PATH properly otherwise
libonnxruntime.so may not be able to find custom ops and shared EPs.
4. On Linux we also need to set LD_PRELOAD before running some tests(if
the main executable, like python, is not built with address sanitizer.
On Windows we do not need to.
5. On Windows before running python tests we should manually copy
address sanitizer DLL to the onnxruntime/capi directory, because python
3.8 and above has enabled "Safe DLL Search Mode" that wouldn't use the
information provided by PATH env.
6. On Linux Address Sanitizer found a lot of memory leaks from our
python binding code. Therefore right now we cannot enable Address
Sanitizer when building ONNX Runtime with python binding.
7. Address Sanitizer itself uses a lot of memory address space and
delays memory deallocations, which is easy to cause OOM issues in 32-bit
applications. We cannot run all the tests in onnxruntime_test_all in
32-bit mode with Address Sanitizer due to this reason. However, we still
can run individual tests in such a way. We just cannot run all of them
in one process.

### Motivation and Context
To catch memory issues.
2024-01-12 07:24:40 -08:00
..
eager Update torch in eager mode CI pipeline (#14094) 2023-01-06 11:46:44 -08:00
post_to_dashboard Pin version of post to dashboard scripts' dependencies and update them to work with recent version. (#10353) 2022-01-21 19:35:58 -08:00
bundle_dlls_gpu.bat Create combined GPU tarball and zip file package (#8827) 2021-08-25 13:51:18 -07:00
bundle_nuget_with_native_headers.bat [TensorRT EP] Refactor OrtTensorRTProviderOptions initialization and make it easy to add new field (#17617) 2023-10-06 14:12:20 -07:00
extract_nuget_files.ps1 Creating Nuget and Android packages for Training (#15712) 2023-05-01 12:59:56 -07:00
extract_nuget_files_gpu.ps1 Patch Protobuf and ONNX's cmake files and enforce BinSkim check (#13694) 2022-11-18 10:09:47 -08:00
extract_zip_files_gpu.ps1 Fix issue of GPU tarball/zip/java package (#8850) 2021-08-26 10:16:16 -07:00
helpers.ps1 Enable Address Sanitizer in CI (#19073) 2024-01-12 07:24:40 -08:00
install_third_party_deps.ps1 Enable Address Sanitizer in CI (#19073) 2024-01-12 07:24:40 -08:00
jar_gpu_packaging.ps1 Create combined GPU tarball and zip file package (#8827) 2021-08-25 13:51:18 -07:00
jar_packaging.ps1 remove wrong placed libs (#12201) 2022-07-18 09:22:22 -07:00
post_binary_sizes_to_dashboard.py Disable PERF* rules in ruff to allow better readability (#16834) 2023-07-25 15:38:22 -07:00
post_code_coverage_to_dashboard.py Adopt linrtunner as the linting tool - take 2 (#15085) 2023-03-24 15:29:03 -07:00
set_telemetry_var.ps1 Update the post-merge pipeline (#14965) 2023-03-29 13:12:07 -07:00
setup_env.bat Add license header to some files. (#13074) 2022-09-23 18:46:02 -07:00
setup_env_cuda.bat Update setup_env_cuda.bat (#18176) 2023-10-30 21:28:02 -07:00
setup_env_gpu.bat Update batch file to set PATH for Cuda with TRT (#18182) 2023-10-31 10:22:40 -07:00
setup_env_trt.bat Fix Multi GPU TensorRT tests (#17269) 2023-08-25 20:30:45 -07:00
setup_env_x86.bat Add license header to some files. (#13074) 2022-09-23 18:46:02 -07:00