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

Common: Don't use MAP_FIXED on Linux #11282

Merged
merged 1 commit into from
May 21, 2024

Commits on May 21, 2024

  1. Common: Don't use MAP_FIXED on Linux

    MAP_FIXED will clobber any existing memory mapping, and is not safe
    to use in a multi-threaded environment. Whether we like it or not,
    we are a multi-threaded environment, because Qt initializes before
    we get to main(), so it's already too late to safely use MAP_FIXED
    by the time we get there.
    
    Use MAP_FIXED_NOREPLACE instead. This is how MAP_FIXED should have
    behaved from the beginning.
    
    Obviously this means you'll need Linux 4.17+ and a semi-recent libc
    to use PCSX2 now. But if you're running a 6 year old unsupported
    kernel, you have bigger problems.
    
    Fixes "random" startup crashes.
    stenzek committed May 21, 2024
    Configuration menu
    Copy the full SHA
    e47bcf8 View commit details
    Browse the repository at this point in the history