From 20c95491980fd067f9be8e135986d7f1f2ac33e2 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 27 Mar 2021 18:00:13 +0100 Subject: [PATCH] polishing thread sanitizer throws warnings, probably because off 'terminallyIll' --- cmake/Compiler-GNU.cmake | 6 ++++-- src/phase_mechanical_plastic_nonlocal.f90 | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/Compiler-GNU.cmake b/cmake/Compiler-GNU.cmake index 1089e73f1..b9a7406dc 100644 --- a/cmake/Compiler-GNU.cmake +++ b/cmake/Compiler-GNU.cmake @@ -131,8 +131,10 @@ set (DEBUG_FLAGS "${DEBUG_FLAGS} -fcheck=all") set (DEBUG_FLAGS "${DEBUG_FLAGS} -fstack-protector-all") # Inserts a guard variable onto the stack frame for all functions -# Detect memory leaks -# -fsanitize=address +set (DEBUG_FLAGS "${DEBUG_FLAGS} -fsanitize=undefined") +# detect undefined behavior +# Additional options +# -fsanitize=address,leak,thread #------------------------------------------------------------------------------------------------ # precision settings diff --git a/src/phase_mechanical_plastic_nonlocal.f90 b/src/phase_mechanical_plastic_nonlocal.f90 index e4e008fab..2ceaea7e2 100644 --- a/src/phase_mechanical_plastic_nonlocal.f90 +++ b/src/phase_mechanical_plastic_nonlocal.f90 @@ -1819,7 +1819,7 @@ subroutine storeGeometry(ph) integer, intent(in) :: ph - integer :: ip, el, ce, co + integer :: ce, co real(pReal), dimension(:), allocatable :: V