Skip to content

Commit

Permalink
User/joschonb/asan cleanup (colmap#1391)
Browse files Browse the repository at this point in the history
* Add Address Sanitizer options and fix reported issues

* Add CI build

* Fix

* Asan with clang

* Small cosmetic fixes to recent ASan support
  • Loading branch information
ahojnnes authored Jan 22, 2022
1 parent 98974ba commit 6093342
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .azure-pipelines/build-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters:
asanEnabled: false

jobs:
- job: ubuntu_build_${{ replace(parameters.ubuntuVersion, '.', '') }}_cuda_${{ parameters.cudaEnabled }}_asa_${{ parameters.asanEnabled }}
- job: ubuntu_build_${{ replace(parameters.ubuntuVersion, '.', '') }}_cuda_${{ parameters.cudaEnabled }}_asan_${{ parameters.asanEnabled }}
displayName: '${{ parameters.displayName }}'
pool:
vmImage: 'ubuntu-${{ parameters.ubuntuVersion }}'
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
sudo apt-get install -y clang-10
echo '##vso[task.setvariable variable=CC]/usr/bin/clang'
echo '##vso[task.setvariable variable=CXX]/usr/bin/clang++'
displayName: 'Install CUDA'
displayName: 'Install Clang'
- script: |
cmake --version
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ else()
endif()

if(ASAN_ENABLED)
message(STATUS "Enabling ASan flags")
message(STATUS "Enabling ASan support")
if(IS_CLANG OR IS_GNU)
add_compile_options(-fsanitize=address -fno-omit-frame-pointer -fsanitize-address-use-after-scope)
add_link_options(-fsanitize=address)
Expand Down

0 comments on commit 6093342

Please sign in to comment.