Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ASan option detect_odr_violation=0 from libshortfin CI #151

Open
marbre opened this issue Aug 26, 2024 · 0 comments
Open

Remove ASan option detect_odr_violation=0 from libshortfin CI #151

marbre opened this issue Aug 26, 2024 · 0 comments

Comments

@marbre
Copy link
Collaborator

marbre commented Aug 26, 2024

ODR violations are ignored by setting ASAN_OPTIONS=detect_odr_violation=0, which was done in the CI workflow .github/workflows/ci_linux_x64_asan-libshortfin.yml with PR #152. This option should be removed asap.


It the option is set in the CI since the target shortfin_array_test fails during compilation with

==5954==ERROR: AddressSanitizer: odr-violation (0x5559c8269ba0):
  [1] size=20 'typeinfo name for spdlog::spdlog_ex' sharktank/libshortfin/build/_deps/spdlog-src/src/spdlog.cpp in sharktank/libshortfin/build/src/shortfin/array/shortfin_array_test
  [2] size=20 'typeinfo name for spdlog::spdlog_ex' sharktank/libshortfin/build/_deps/spdlog-src/src/spdlog.cpp in sharktank/libshortfin/build/src/libshortfin.so.1
These globals were registered at these points:
  [1]:
    #0 0x5559c83152a6 in __asan_register_globals (sharktank/libshortfin/build/src/shortfin/array/shortfin_array_test+0x20c2a6)
    #1 0x5559c83163bd in __asan_register_elf_globals (sharktank/libshortfin/build/src/shortfin/array/shortfin_array_test+0x20d3bd)
    #2 0x7f9fe0ef240d in call_init /tmp/portage/sys-libs/glibc-2.39-r6/work/glibc-2.39/csu/../csu/libc-start.c:145:3
    #3 0x7f9fe0ef240d in __libc_start_main /tmp/portage/sys-libs/glibc-2.39-r6/work/glibc-2.39/csu/../csu/libc-start.c:347:5

  [2]:
    #0 0x5559c83152a6 in __asan_register_globals (sharktank/libshortfin/build/src/shortfin/array/shortfin_array_test+0x20c2a6)
    #1 0x5559c83163bd in __asan_register_elf_globals (sharktank/libshortfin/build/src/shortfin/array/shortfin_array_test+0x20d3bd)
    #2 0x7f9fe1c651bd in call_init /tmp/portage/sys-libs/glibc-2.39-r6/work/glibc-2.39/elf/dl-init.c:74:3
    #3 0x7f9fe1c651bd in call_init /tmp/portage/sys-libs/glibc-2.39-r6/work/glibc-2.39/elf/dl-init.c:26:1

==5954==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global 'typeinfo name for spdlog::spdlog_ex' at sharktank/libshortfin/build/_deps/spdlog-src/src/spdlog.cpp in sharktank/libshortfin/build/src/shortfin/array/shortfin_array_test
==5954==ABORTING
CMake Error at /usr/share/cmake/Modules/GoogleTestAddTests.cmake:112 (message):
  Error running test executable.

    Path: 'sharktank/libshortfin/build/src/shortfin/array/shortfin_array_test'
    Working directory: 'sharktank/libshortfin/build/src/shortfin/array'
    Result: 1
    Output:
      

Call Stack (most recent call first):
  /usr/share/cmake/Modules/GoogleTestAddTests.cmake:226 (gtest_discover_tests_impl)

when configured with

cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_LINKER_TYPE=LLD -DSHORTFIN_BUNDLE_DEPS=ON -DSHORTFIN_IREE_SOURCE_DIR=${IREE_SOURCE_DIR} -DSHORTFIN_BUILD_PYTHON_BINDINGS=ON -DSHORTFIN_ENABLE_ASAN=ON ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@marbre and others