Page MenuHomePhabricator

Windows: fix eina_file_map_new()
ClosedPublic

Authored by vtorri on Jun 25 2020, 4:23 AM.

Details

Summary

the offset passed to MapViewOfFile() must be a multiple of the granularity.

https://docs.microsoft.com/en-us/windows/win32/memory/creating-a-view-within-a-file is taken as basis for this patch

Test Plan

unit test

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vtorri created this revision.Jun 25 2020, 4:23 AM
vtorri requested review of this revision.Jun 25 2020, 4:23 AM
vtorri edited the summary of this revision. (Show Details)Jun 25 2020, 4:34 AM
vtorri added subscribers: bu5hm4n, jptiz, walac.
walac added inline comments.Jun 25 2020, 6:57 AM
src/lib/eina/eina_file_win32.c
915

If the map is found in the hashtable, won't ret return NULL.

vtorri added inline comments.Jun 25 2020, 7:00 AM
src/lib/eina/eina_file_win32.c
915

indeed, a else is needed

vtorri updated this revision to Diff 30785.Jun 25 2020, 7:44 AM

fix case when map is found in the hash table

walac accepted this revision.Jun 26 2020, 6:32 AM
This revision is now accepted and ready to land.Jun 26 2020, 6:32 AM
stefan_schmidt accepted this revision.Jun 26 2020, 6:40 AM
stefan_schmidt added a subscriber: stefan_schmidt.

Limited review as I have no clue on the windows system side. :-)

This revision was automatically updated to reflect the committed changes.