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

core: fix ASAN_START_SWITCH_FIBER() usage #8977

Commits on Aug 14, 2023

  1. core: fix ASAN_START_SWITCH_FIBER() usage

    The `__sanitizer_start_switch_fiber()` function takes a pointer as the
    first argument to store the current fake stack if there is one (it is
    necessary when stack-use-after-return detection is enabled). When leaving a
    fiber definitely, NULL must be passed so that the fake stack is destroyed.
    
    Before this patch, NULL was passed for dead fibers, however this is wrong
    for dead fibers that are recycled and resumed. In such cases ASAN destroys
    the fake stack, and the fiber crashes trying to use it in `fiber_yield()`
    upon return from `coro_transfer()`.
    
    Closes tarantool/tarantool-qa#321
    
    NO_DOC=bugfix
    NO_TEST=tested by test-release-asan workflow
    Gumix committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    4e414eb View commit details
    Browse the repository at this point in the history