Skip to content

Conversation

@nojb
Copy link
Contributor

@nojb nojb commented Nov 9, 2023

Fixes a segmentation fault under Windows when the runtime (ocamlrun.exe) is not found in the PATH.

The bug and the fix were identified by @vadim-z. @dra27 had a similar fix in one of his working branches as well.

Fixes #12722

@nojb nojb requested a review from dra27 November 9, 2023 14:12
Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

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

The MSDN documentation for SearchPathW doesn't make it explicit that NULL can be passed, but it does list lpFilePart as being optional.

I wonder whether in the past it wasn't quite this optional, but I ran this PR locally (on Windows 10) and it appears to behave as expected.

@dra27 dra27 merged commit 22e7c76 into ocaml:trunk Nov 10, 2023
@nojb nojb deleted the fix_headernt branch November 10, 2023 10:39
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.

NULL dereference in the "header" stub of bytecode executables for Windows

2 participants