Browse Source

[video_core/control] Fix SIGBUS due to uninit channel_state (#4406)

Some homebrew don't properly initialize the GPU but seemingly try to use it, this is meant to be benign, yet triggers a SIGBUS due to garbage data being on the pointer after ctor(), so the fix is to make it nullptr on construction.

Signed-off-by: lizzie <lizzie@eden-emu.dev>

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4406
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
master
lizzie 13 hours ago
committed by crueter
parent
commit
9b64944480
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 2
      src/video_core/control/channel_state_cache.h

2
src/video_core/control/channel_state_cache.h

@ -78,7 +78,7 @@ public:
protected:
static constexpr size_t UNSET_CHANNEL{(std::numeric_limits<size_t>::max)()};
P* channel_state;
P* channel_state = nullptr;
size_t current_channel_id{UNSET_CHANNEL};
size_t current_address_space{};
Tegra::Engines::Maxwell3D* maxwell3d{};

Loading…
Cancel
Save