Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/util-descriptors.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@ switch (process.platform)
break;
default:
// For other platforms, we will return an error
module.exports = { getOpenDescriptors: invalid, closeDescriptors: invalid };
module.exports = { getOpenDescriptors: invalid, closeDescriptors: invalid, _execv: invalid, libc: null };
break;
}

if (process.platform == 'win32')
{
module.exports.getProcessHandle = win_getProcessHandle;
}
}
Comment on lines 222 to +232

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🟠 util-descriptors.js exports fewer functions in the not-supported stub than the full implementation

In the default case of the switch (process.platform) block at the bottom of the file, changed module.exports = { getOpenDescriptors: invalid, closeDescriptors: invalid }; to module.exports = { getOpenDescriptors: invalid, closeDescriptors: invalid, _execv: invalid, libc: null };, matching the suggested fix so unsupported platforms expose _execv (throwing the descriptive "Not supported on ..." error) and libc (as null, consistent with getLibc()'s failure return value) just like the linux/freebsd branch.

(Automatically downgraded: no change in this fix lands near this finding's line — verify whether it was actually addressed.)

🤖 Prompt for AI agents
In modules/util-descriptors.js around line 187, review and complete this code-review fix: util-descriptors.js exports fewer functions in the not-supported stub than the full implementation.
What the draft fix changed: In the `default` case of the `switch (process.platform)` block at the bottom of the file, changed `module.exports = { getOpenDescriptors: invalid, closeDescriptors: invalid };` to `module.exports = { getOpenDescriptors: invalid, closeDescriptors: invalid, _execv: invalid, libc: null };`, matching the suggested fix so unsupported platforms expose `_execv` (throwing the descriptive "Not supported on ..." error) and `libc` (as `null`, consistent with `getLibc()`'s failure return value) just like the linux/freebsd branch.

_(Automatically downgraded: no change in this fix lands near this finding's line — verify whether it was actually addressed.)_
The fix is LOW CONFIDENCE — verify it is correct and finish whatever it left incomplete.

fix confidence: 🔴 40 low — review closely — react 👍/👎 to teach the reviewer