Commit 730296a5 authored by Robert Schmidt's avatar Robert Schmidt

Enable Address Sanitizer on physical simulators

- install libasan in physim containers
- run physim containers with SYS_CAP_PTRACE capability
- remove static-libasan: not available in RHEL8:

  The physims are tested in a container environment on top of RHEL8. To
  my knowledge, no package provides the static ASan library there.
  Therefore, remove it here to be able to run these tests.
parent 141b9d2c
......@@ -33,7 +33,9 @@ podSecurityContext:
securityContext:
privileged: true
# capabilities:
capabilities:
add:
- SYS_CAP_PTRACE
# drop:
# - ALL
# readOnlyRootFilesystem: true
......
......@@ -33,7 +33,9 @@ podSecurityContext:
securityContext:
privileged: true
# capabilities:
capabilities:
add:
- SYS_CAP_PTRACE
# drop:
# - ALL
# readOnlyRootFilesystem: true
......
......@@ -33,7 +33,9 @@ podSecurityContext:
securityContext:
privileged: true
# capabilities:
capabilities:
add:
- SYS_CAP_PTRACE
# drop:
# - ALL
# readOnlyRootFilesystem: true
......
......@@ -33,7 +33,9 @@ podSecurityContext:
securityContext:
privileged: true
# capabilities:
capabilities:
add:
- SYS_CAP_PTRACE
# drop:
# - ALL
# readOnlyRootFilesystem: true
......
......@@ -33,7 +33,9 @@ podSecurityContext:
securityContext:
privileged: true
# capabilities:
capabilities:
add:
- SYS_CAP_PTRACE
# drop:
# - ALL
# readOnlyRootFilesystem: true
......
......@@ -33,7 +33,9 @@ podSecurityContext:
securityContext:
privileged: true
# capabilities:
capabilities:
add:
- SYS_CAP_PTRACE
# drop:
# - ALL
# readOnlyRootFilesystem: true
......
......@@ -33,7 +33,9 @@ podSecurityContext:
securityContext:
privileged: true
# capabilities:
capabilities:
add:
- SYS_CAP_PTRACE
# drop:
# - ALL
# readOnlyRootFilesystem: true
......
......@@ -33,7 +33,9 @@ podSecurityContext:
securityContext:
privileged: true
# capabilities:
capabilities:
add:
- SYS_CAP_PTRACE
# drop:
# - ALL
# readOnlyRootFilesystem: true
......
......@@ -33,7 +33,9 @@ podSecurityContext:
securityContext:
privileged: true
# capabilities:
capabilities:
add:
- SYS_CAP_PTRACE
# drop:
# - ALL
# readOnlyRootFilesystem: true
......
......@@ -33,7 +33,9 @@ podSecurityContext:
securityContext:
privileged: true
# capabilities:
capabilities:
add:
- SYS_CAP_PTRACE
# drop:
# - ALL
# readOnlyRootFilesystem: true
......
......@@ -33,7 +33,9 @@ podSecurityContext:
securityContext:
privileged: true
# capabilities:
capabilities:
add:
- SYS_CAP_PTRACE
# drop:
# - ALL
# readOnlyRootFilesystem: true
......
......@@ -33,7 +33,9 @@ podSecurityContext:
securityContext:
privileged: true
# capabilities:
capabilities:
add:
- SYS_CAP_PTRACE
# drop:
# - ALL
# readOnlyRootFilesystem: true
......
......@@ -343,8 +343,8 @@ set(CMAKE_CXX_FLAGS
if (SANITIZE_ADDRESS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer -static-libasan -fno-common")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -static-libasan -fno-common")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fno-common")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fno-common")
endif ()
add_definitions("-DASN_DISABLE_OER_SUPPORT")
......
......@@ -31,11 +31,14 @@ RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
#only install address sanitizer for this container, the others don't need it
RUN yum install -y libasan
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --phy_simulators --ninja --verbose-ci
./build_oai --phy_simulators -g --ninja --verbose-ci --sanitize-address
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-physim
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment