onnxruntime/tools/ci_build/github/linux
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
..
docker Enable Address Sanitizer in CI (#19073) 2024-01-12 07:24:40 -08:00
ort_minimal [Linter] Bump ruff and remove pylint (#17797) 2023-10-05 21:07:33 -07:00
tvm Fix TVM pipelines (#15653) 2023-04-26 09:55:05 +02:00
build_cuda_c_api_package.sh Enable Address Sanitizer in CI (#19073) 2024-01-12 07:24:40 -08:00
build_linux_python_package.sh Enable Address Sanitizer in CI (#19073) 2024-01-12 07:24:40 -08:00
build_rocm_c_api_package.sh Enable Address Sanitizer in CI (#19073) 2024-01-12 07:24:40 -08:00
build_tensorrt_c_api_package.sh Enable Address Sanitizer in CI (#19073) 2024-01-12 07:24:40 -08:00
build_yocto.sh Bring code coverage dashboard back (#8394) 2021-08-16 20:54:39 -07:00
copy_strip_binary.sh Add cuda context headers to zip (#18330) 2023-11-09 14:53:58 -08:00
create_package.sh Pull the latest image before running docker build 2019-11-22 13:48:37 -08:00
extract_and_bundle_gpu_package.sh [TensorRT EP] Refactor OrtTensorRTProviderOptions initialization and make it easy to add new field (#17617) 2023-10-06 14:12:20 -07:00
java_copy_strip_binary.sh Change native folder name for java macos arm64 (#12335) 2022-07-27 15:13:07 -07:00
java_linux_final_test.sh Update protobuf-java to version 3.21.7 (#13630) 2022-11-17 15:04:42 -08:00
run_build.sh Fix Linux MultiGPU TensorRT CI (#15697) 2023-04-26 10:01:33 -07:00
run_dockerbuild.sh Fix Multi GPU TensorRT tests (#17269) 2023-08-25 20:30:45 -07:00
run_python_dockerbuild.sh Create a new Python Package pipeline for CUDA 12 (#18348) 2023-11-20 09:48:28 -08:00
run_python_dockertest.sh Remove dnf update from docker build scripts (#17551) 2023-09-21 07:33:29 -07:00
run_python_tests.sh Adding new pipeline for python cuda testing (#18718) 2023-12-18 18:13:03 -08:00
test_custom_ops_pytorch_export.sh Change "Export PyTorch CustomOp" build pipeline to use Ubuntu 20.04 (#8158) 2021-06-28 16:13:55 -07:00
upload_code_coverage_data.sh 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
upload_ortsrv_binaries.sh Refactor Onnx runtime Server to only use public APIs (#1271) 2019-07-04 01:08:14 -07:00
yocto_build_toolchain.sh Bring code coverage dashboard back (#8394) 2021-08-16 20:54:39 -07:00