Manas103 opened a new pull request, #48788:
URL: https://github.com/apache/arrow/pull/48788

   ## Problem
   The `__map_mman_error()` function in `mman.h` was returning raw Windows 
error codes instead of POSIX errno values, breaking errno-based error handling 
in memory mapping operations.
   
   ## Solution
   Implemented proper Windows error code to POSIX errno mapping, matching 
Arrow's `WinErrorToErrno()` conventions for consistency.
   
   ### Changes
   - Map common memory mapping errors (file not found, access denied, memory 
errors, etc.) to appropriate errno values
   - Maintain behavioral compatibility by using `deferr` parameter (EPERM 
default)
   - Added comprehensive Windows-gated unit tests in `file_test.cc`
   
   ### Testing
   Added `TestMmanErrorMapping.MapCommonErrors` test covering:
   - All 14 mapped error codes
   - Zero error code case  
   - Fallback behavior with unknown errors
   - Tests are Windows-gated (`#ifdef _WIN32`)
   
   ### Compatibility
   - Matches Arrow's existing `WinErrorToErrno()` mapping conventions exactly
   - Maintains API contract (uses `deferr` parameter)
   - Fixes broken behavior without changing mapped error semantics
   - Windows-only change, no impact on other platforms
   
   ### Risk
   Low - Windows-only change, maintains API contract, fixes broken behavior.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to