Open
Conversation
Owner
|
one thing to note, The and also do you suggest editing the build workflow to include other platforms (MacOS, Linux)? |
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a POSIX implementation of
MappedFile(macOS, Linux, etc.) usingopen/fstat/mmap, so PE scanning is not Windows-only at compile time.Problem
The class and its implementation were guarded with
#ifdef _WIN32. On macOS the header did not declare the type andmapped_file.cppcompiled to an empty translation unit, sope_scanner.cppfailed to build (unknown type name 'MappedFile'), and the linker reported no symbols formapped_file.cpp.o.Solution
MappedFileon all platforms, with separate private members for Windows vs POSIX.mmap, and unmap/close in the destructor.mmap; object remains valid andget_data()returns an emptystd::span.Testing
cmake --build … --config Releaseon macOS — full build includingkeydotsucceeds.Notes
is_valid(),get_data()) matches the Windows behavior; constructor failures log tostderr, consistent with the Win32 path.