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

BBA/HLE: Fix random PCAP file corruption #12304

Merged
merged 1 commit into from Nov 23, 2023

Conversation

sepalani
Copy link
Contributor

This PR addresses a concurrency issue between RecvHandlePacket and SendFromDirectFIFO while logging BBA packets in a PCAP file. I chose not to implement the lock in the PCAP class to avoid performance impacts in cases where there are no concurrency.

Ready to be reviewed & tested.

@AdmiralCurtiss
Copy link
Contributor

Why static? Wouldn't it be enough to just have the mutex as a member of PCAPSSLCaptureLogger?

Concurrency between RecvHandlePacket and SendFromDirectFIFO
@sepalani
Copy link
Contributor Author

Why static? Wouldn't it be enough to just have the mutex as a member of PCAPSSLCaptureLogger?

Changed to a member variable which is a better approach, especially if at some point we allow multiple loggers to be instantiated.

@AdmiralCurtiss AdmiralCurtiss merged commit feeac10 into dolphin-emu:master Nov 23, 2023
11 checks passed
@sepalani sepalani deleted the pcap-io branch November 23, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants