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

Fix asan error in RTDyldObjectLinkingLayer.cpp #1

Merged
merged 1 commit into from
Aug 27, 2024

Commits on Aug 27, 2024

  1. Fix asan error in RTDyldObjectLinkingLayer.cpp

    `JITDylibSearchOrderResolver` local variable can be destroyed before completion of all callbacks. Capture it together with `Deps` in `OnEmitted` callback.
    
    Original error:
    
    ```
    ==2035==ERROR: AddressSanitizer: stack-use-after-return on address 0x7bebfa155b70 at pc 0x7ff2a9a88b4a bp 0x7bec08d51980 sp 0x7bec08d51978
    READ of size 8 at 0x7bebfa155b70 thread T87 (tf_xla-cpu-llvm)
        #0 0x7ff2a9a88b49 in operator() third_party/llvm/llvm-project/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp:55:58
        #1 0x7ff2a9a88b49 in __invoke<(lambda at third_party/llvm/llvm-project/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp:55:9) &, const llvm::DenseMap<llvm::orc::JITDylib *, llvm::DenseSet<llvm::orc::SymbolStringPtr, llvm::DenseMapInfo<llvm::orc::SymbolStringPtr, void> >, llvm::DenseMapInfo<llvm::orc::JITDylib *, void>, llvm::detail::DenseMapPair<llvm::orc::JITDylib *, llvm::DenseSet<llvm::orc::SymbolStringPtr, llvm::DenseMapInfo<llvm::orc::SymbolStringPtr, void> > > > &> third_party/crosstool/v18/stable/src/libcxx/include/__type_traits/invoke.h:149:25
        #2 0x7ff2a9a88b49 in __call<(lambda at third_party/llvm/llvm-project/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp:55:9) &, const llvm::DenseMap<llvm::orc::JITDylib *, llvm::DenseSet<llvm::orc::SymbolStringPtr, llvm::DenseMapInfo<llvm::orc::SymbolStringPtr, void> >, llvm::DenseMapInfo<llvm::orc::JITDylib *, void>, llvm::detail::DenseMapPair<llvm::orc::JITDylib *, llvm::DenseSet<llvm::orc::SymbolStringPtr, llvm::DenseMapInfo<llvm::orc::SymbolStringPtr, void> > > > &> third_party/crosstool/v18/stable/src/libcxx/include/__type_traits/invoke.h:224:5
        llvm#3 0x7ff2a9a88b49 in operator() third_party/crosstool/v18/stable/src/libcxx/include/__functional/function.h:210:12
        llvm#4 0x7ff2a9a88b49 in void std::__u::__function::__policy_invoker<void (llvm::DenseMap<llvm::orc::JITDylib*, llvm::DenseSet<llvm::orc::SymbolStringPtr,
    ```
    ezhulenev authored Aug 27, 2024
    Configuration menu
    Copy the full SHA
    977e11f View commit details
    Browse the repository at this point in the history