Skip to content

do not treat an unknown process machine as native - #56

Merged
JamesLinYJ merged 1 commit into
mainfrom
cursor/unknown-process-machine
Nov 9, 2026
Merged

JamesLinYJ merged 1 commit into
mainfrom
cursor/unknown-process-machine

Conversation

@JamesLinYJ

Copy link
Copy Markdown
Owner

Summary

classify_machines treated a process as native when IsWow64Process2 reported IMAGE_FILE_MACHINE_UNKNOWN and no process machine was reported. ARM64 already returned ERROR_NOT_SUPPORTED for that case. Other hosts took the final None => native_machine arm and labeled the unknown process ExecutionMode::Native.

An unknown process machine is now an error on every host. A machine that was actually reported, or that came from a known WOW64 machine, still uses the existing success path, including a real native match.

Test

unknown_process_machine_is_an_error_and_reported_native_stays_native checks that an unknown process machine is Err(ERROR_NOT_SUPPORTED) on ARM64, AMD64, and I386, and that a reported native machine is still ExecutionMode::Native.

Linux cannot compile the Windows resource script (llvm-rc is not installed), so this crate's tests were not executed here.

Open in Web Open in Cursor 

IsWow64Process2 reports IMAGE_FILE_MACHINE_UNKNOWN for every non-WOW64
process. Without a reported machine, return an error on every host
instead of labeling that unknown process native.

Co-authored-by: jameslincn <jameslincn@outlook.sg>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T07:17:23.898645Z 94eb0fe PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@JamesLinYJ
JamesLinYJ merged commit 1021f74 into main Nov 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants