-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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(streaming/five): unloading of weapon components #2222
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using struct padding might be a bit risky in case of future struct changes, but I guess this is the easiest way to avoid messing with additional mappings. These changes work as expected, tested on all available game builds.
This was considered when doing the fix, given this structure's last field layout (according to rage-parser-dumps) hasn't changed since build 323 I figured it would be safe enough. What would be the preferred way of doing this in the future? |
Yeah this is why it's acceptable, the risk is still kinda low. I guess the best thing we can do here (since the struct size was never changed before) is to add |
Both This unsoundness should be documented at the very least. Although, it may be better to only allow component unloading if Also, the result to |
Right, good catch. Before I go ahead with changes, are any issues foreseen with: For If the above is unwanted, then the |
With this solution, you may want to check if Unless sentry shows an issue needing to be fixed (e.g., players who swap servers sometimes hit this pool error), only enabling this for This is already extreme edge-case territory and it being exploitable is unlikely (i.e., under very specific circumstances some garbage memory may be read). Ultimately, a higher authority will need to weigh-in. (Sidenote: the |
Resolves a crash caused by weapon components not being removed on data file unload (the
UnloadDataFile
method forCWeaponComponentDataFileMounter
is a nullsub). This can be reproduced by creating a resource with e.g. 250 additional weapon components and restarting it 10 times, a pool error will eventually be hit. In our case, this was being hit in Rockstar Editor when playback was moving between clips