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 SkipScan crash due to pruned unique path #3881

Commits on Dec 2, 2021

  1. Fix SkipScan crash due to pruned unique path

    When SkipScan paths are added it can result in a crash if the new
    SkipScan dominates the PostgreSQL planned unique path. In that case,
    the previous unique path is pruned and freed, leading to a potential
    memory corruption since a pointer to the original unique path is used
    when looping over all subpaths to try to apply SkipScan. Thus, if the
    original unique path is pruned, and there are multiple subpaths, a
    crash will occur in the next iteration over the subpaths.
    
    The crash is fixed by making a shallow copy of the original unique
    path while iterating the subpaths.
    erimatnor committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    095991a View commit details
    Browse the repository at this point in the history