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 potential crash in begin_occlusion_query() while closing the Emu #5605

Merged
merged 3 commits into from Jan 30, 2019

Conversation

Projects
None yet
4 participants
@elad335
Copy link
Contributor

elad335 commented Jan 28, 2019

If the emu is stopped while in allocate_new_query(), m_current_task will not be set and remain as nullptr in ZCULL_control::set_active().
The pointer is later on dereferenced in begin_occlusion_query().

@elad335 elad335 force-pushed the elad335:master branch 2 times, most recently from e2b9bd0 to 6c17543 Jan 28, 2019

@elad335 elad335 force-pushed the elad335:master branch 2 times, most recently from e356d21 to 7170583 Jan 28, 2019

@kd-11 kd-11 requested a review from Nekotekina Jan 29, 2019

@kd-11
Copy link
Contributor

kd-11 left a comment

Occlusion crash fix is fine, need someone else to review the threading stuff though.

Show resolved Hide resolved Utilities/Thread.cpp Outdated
Show resolved Hide resolved Utilities/Thread.cpp Outdated
Show resolved Hide resolved Utilities/Thread.cpp Outdated

@elad335 elad335 force-pushed the elad335:master branch from 7170583 to ee96336 Jan 30, 2019

@elad335 elad335 force-pushed the elad335:master branch from ee96336 to c99831e Jan 30, 2019

Fix access violations reporting on RSX
and on other threads that do not have cpu_thread handler

@elad335 elad335 force-pushed the elad335:master branch from c99831e to 21b1b5a Jan 30, 2019

@elad335

This comment has been minimized.

Copy link
Contributor Author

elad335 commented Jan 30, 2019

I've made access violations pause the emulation.
It makes them always appear the last on the log, instead of letting other threads keep logging messages and hiding it.
This also avoids situations where other threads are starting to crash one after another after the first access violation.

@Nekotekina Nekotekina merged commit 25aa5f8 into RPCS3:master Jan 30, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.