Skip to content

[debugger] Replace PRDIsEmpty(opcode) activation check with explicit m_activated flag #124499

@matouskozak

Description

@matouskozak

DebuggerControllerPatch::IsActivated() uses PRDIsEmpty(opcode) (opcode == 0) as the sentinel for "patch not active." The interpreter has valid opcode with value 0, so it requires a workaround to work with existing infrastructure.

We should consider replacing the PRDIsEmpty activation check with a single bool m_activated field used by both JIT and interpreter paths. This requires updating ApplyPatch/UnapplyPatch (both execution control paths) to set m_activated, auditing all PRDIsEmpty call sites that check activation semantics, and verifying DAC/right-side compatibility since the right side currently assumes non-zero opcode + non-zero address = valid patch when reading the patch table out-of-process.

Another solution could be to to force interpreter to not use opcode with value 0 and keep existing check.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions