Memory Observer pattern search: short sequences in 8/16 byte SIMD mode compare stale bytes

Open
#2,608 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
devtools

Research direction

Start in the Memory Observer search code and find JumpToMemory, where the highlight length is currently passed as m_sequenceSize (8, 16 or 255) instead of the length of the entered sequence. Read the SIMD comparison paths for the 8- and 16-byte modes to see where the full width is compared, and check how #2606 touched the same area. Done means a short sequence such as AB matches in 8/16 byte SIMD mode without comparing stale trailing bytes.

Written by the indexing model from the issue text.

Description

In 8 or 16 byte SIMD mode the search compares the full width, so a shorter entered sequence such as AB also compares the bytes after it, and a real two-byte match can be missed. The highlight length passed to JumpToMemory is m_sequenceSize, which is 8, 16 or 255 whatever was entered. Both found while reviewing redux#2606.

Dominant language
C++
Stars
1k
Forks
158
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from grumpycoders/pcsx-redux

All issues in grumpycoders/pcsx-redux

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.