Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion qa/TL0_cpu_only/test_nofw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ test_body() {
# $ORIGIN/../nvimgcodec rpath entry. Keep the wheel-installed nvimgcodec dir
# reachable via LD_LIBRARY_PATH instead. Mirrors the same workaround in
# qa/test_template_impl.sh::enable_sanitizer().
export LD_LIBRARY_PATH="$(python -c 'import nvidia.nvimgcodec as n, os; print(os.path.dirname(n.__file__))' 2>/dev/null || echo '')"
# first provide paths to nvimgcodec deps then learn its location
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"$(python -c 'import nvidia.nvjpeg2k as n, os; print(os.path.dirname(n.__file__) + "/lib")' 2>/dev/null || echo '')"
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"$(python -c 'import nvidia.nvtiff as n, os; print(os.path.dirname(n.__file__) + "/lib")' 2>/dev/null || echo '')"
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"$(python -c 'import nvidia.nvimgcodec as n, os; print(os.path.dirname(n.__file__))' 2>/dev/null || echo '')"
else
export LD_LIBRARY_PATH=""
fi
Expand Down
5 changes: 4 additions & 1 deletion qa/TL0_cpu_only/test_pytorch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ test_body() {
# $ORIGIN/../nvimgcodec rpath entry. Keep the wheel-installed nvimgcodec dir
# reachable via LD_LIBRARY_PATH instead. Mirrors the same workaround in
# qa/test_template_impl.sh::enable_sanitizer().
export LD_LIBRARY_PATH="$(python -c 'import nvidia.nvimgcodec as n, os; print(os.path.dirname(n.__file__))' 2>/dev/null || echo '')"
# first provide paths to nvimgcodec deps then learn its location
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"$(python -c 'import nvidia.nvjpeg2k as n, os; print(os.path.dirname(n.__file__) + "/lib")' 2>/dev/null || echo '')"
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"$(python -c 'import nvidia.nvtiff as n, os; print(os.path.dirname(n.__file__) + "/lib")' 2>/dev/null || echo '')"
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"$(python -c 'import nvidia.nvimgcodec as n, os; print(os.path.dirname(n.__file__))' 2>/dev/null || echo '')"
else
export LD_LIBRARY_PATH=""
fi
Expand Down
19 changes: 16 additions & 3 deletions qa/leak.sup
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ leak:_PyLong_New
leak:PyBytes_FromString
leak:PyType_GenericAlloc
leak:PyCapsule_New
leak:_PyObject_GC_NewVar
leak:_PyObject_GC_New
leak:PyDict_Copy
leak:_PyObject_New
leak:PyUnicode_New
Expand All @@ -63,4 +61,19 @@ leak:_PyObject_MakeTpCall
leak:PyDict_SetDefault
leak:PySequence_List
leak:_PyFunction_Vectorcall
leak:numa_node_to_cpus
leak:numa_node_to_cpus
leak:PyUnicode_FromKindAndData
leak:PyImport_ImportModuleLevelObject
leak:_PyImport_*
leak:_PyObject_GC_*
leak:PyDict_SetItemString
leak:PyUnicode_InternFromString
leak:PyRun_SimpleStringFlags
leak:PyRun_StringFlags
leak:_PyRun_SimpleFileObject
leak:_PyUnicode_FromASCII
leak:Py_CompileStringObject
leak:_PyUnicode_DecodeUnicodeEscapeInternal2
leak:/usr/bin/sort
leak:/usr/bin/tr
leak:yyparse
10 changes: 7 additions & 3 deletions qa/test_template_impl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ epilog=${epilog-:}
numer_of_prolog_elms=${#prolog[@]}

enable_sanitizer() {
export ASAN_OPTIONS=symbolize=1:protect_shadow_gap=0:log_path=sanitizer.log:start_deactivated=true:allocator_may_return_null=1:detect_leaks=1:fast_unwind_on_malloc=0:verify_asan_link_order=0:detect_container_overflow=0:suppressions=$topdir/qa/address.sup
export ASAN_SYMBOLIZER_PATH=$(which llvm-symbolizer)
# avoid python false positives
export PYTHONMALLOC=malloc
# if something calls dlclose on a module that leaks and it happens before asan can extract symbols we get "unknown module"
Expand All @@ -76,7 +74,13 @@ enable_sanitizer() {
export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libasan.so /tmp/glibc_fix.so /tmp/libfakeclose.so /usr/lib/x86_64-linux-gnu/libstdc++.so"
# Workaround for bug in asan ignoring RPATHs https://bugzilla.redhat.com/show_bug.cgi?id=1449604
export OLD_LD_LIBRARY_PATH2=${LD_LIBRARY_PATH} # OLD_LD_LIBRARY_PATH variable name already used
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python -c 'import nvidia.nvimgcodec as n; import os; print(os.path.dirname(n.__file__))')
# first provide paths to nvimgcodec deps then learn its location
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"$(python -c 'import nvidia.nvjpeg2k as n, os; print(os.path.dirname(n.__file__) + "/lib")' 2>/dev/null || echo '')"
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"$(python -c 'import nvidia.nvtiff as n, os; print(os.path.dirname(n.__file__) + "/lib")' 2>/dev/null || echo '')"
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"$(python -c 'import nvidia.nvimgcodec as n, os; print(os.path.dirname(n.__file__))' 2>/dev/null || echo '')"

export ASAN_OPTIONS=symbolize=1:protect_shadow_gap=0:log_path=sanitizer.log:start_deactivated=false:allocator_may_return_null=1:detect_leaks=1:fast_unwind_on_malloc=0:verify_asan_link_order=0:detect_container_overflow=0:suppressions=$topdir/qa/address.sup:malloc_context_size=96
export ASAN_SYMBOLIZER_PATH=$(which llvm-symbolizer)
}

# turn off sanitizer to avoid breaking any non-related system built-ins
Expand Down