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

Emulator RNG (sub-frame resets) can be manipulated #75

Open
CasualPokePlayer opened this issue Oct 27, 2020 · 3 comments
Open

Emulator RNG (sub-frame resets) can be manipulated #75

CasualPokePlayer opened this issue Oct 27, 2020 · 3 comments

Comments

@CasualPokePlayer
Copy link
Member

CasualPokePlayer commented Oct 27, 2020

The seed is apparently consistent on starting up the emulator, lol

@Dabomstew
Copy link
Member

Seems like the fault is here:

https://en.cppreference.com/w/cpp/numeric/random/random_device

A notable implementation where std::random_device is deterministic is old versions of MinGW (bug 338, fixed since GCC 9.2), although replacement implementations exist, such as mingw-std-random_device. The latest MinGW Versions can be downloaded from GCC with the MCF thread model.

which eventually references

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85494

@CasualPokePlayer
Copy link
Member Author

CasualPokePlayer commented Nov 3, 2021

Looking back, I wonder if this is really something we need to "fix" now. We're at GCC 11.2 now, a ways ahead of 9.2. You'd have to have a seriously outdated build environment to get a build with this bug now. And this seems to be a Windows specific case, so the Linux users who are expected to build wouldn't encounter any issues, so this is practically just an issue for the people making future releases.

@entrpntr
Copy link
Contributor

entrpntr commented Nov 3, 2021

It's an issue with the official r717 Windows binaries, not with the code itself. That said, GCC 9.1 was May 2019, which really isn't that ancient (and was obviously even less so when r717 was released).

The main takeaway is whoever builds the official Windows releases in the future should know to have GCC 9.2 at minimum if building with MinGW. No code fix necessary; at most a documentation effort.

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

3 participants