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: UB in remote input info #1316

Merged
merged 1 commit into from
Nov 23, 2023
Merged

fix: UB in remote input info #1316

merged 1 commit into from
Nov 23, 2023

Conversation

EmosewaMC
Copy link
Collaborator

Yes i should have made this first
no this wouldnt have happened with rust

I have NO clue why the new AddComponent caused this. I dug into this for about 10 hours and it was specifically having the PossessableComponent go through the new AddComponent and nothing else. Using the inline variant resulted in the same effect. The RemoteInputInfo in the previous case was always initialized to 0 0 0 1, whereas with the new AddComponent for Possessable, it was UB.

Tested that the client no longer logs HAVOK CRASH ON FRICTION multiple times per frame

Yes i should have made this first
no this wouldnt have happened with rust
@EmosewaMC EmosewaMC changed the title Fix UB in remote input info fi: UB in remote input info Nov 23, 2023
Copy link
Member

@Wincent01 Wincent01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GCC/CLang doesn't initialize members without being told explicitly to do so, but MSVC does. So I don't think this issue would've happened had you compiled on Windows. Had a ton of these issues when we moved away from Windows way back when.

@EmosewaMC
Copy link
Collaborator Author

GCC/CLang doesn't initialize members without being told explicitly to do so, but MSVC does. So I don't think this issue would've happened had you compiled on Windows. Had a ton of these issues when we moved away from Windows way back when.

Yep windows i had the same experience. Worked just fine, but more details on this behavior are in the dev discord. Very """Fun""" bug.

@EmosewaMC EmosewaMC changed the title fi: UB in remote input info fi: Undefined Behavior in remote input info Nov 23, 2023
@EmosewaMC EmosewaMC changed the title fi: Undefined Behavior in remote input info fix: UB in remote input info Nov 23, 2023
@aronwk-aaron aronwk-aaron merged commit fd20baa into main Nov 23, 2023
3 checks passed
@jadebenn jadebenn deleted the fix-racing-imagination branch November 18, 2024 04:25
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

Successfully merging this pull request may close these issues.

3 participants