View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001573 | libextractor | libextractor main library | public | 2010-06-21 15:46 | 2010-10-21 15:47 |
| Reporter | LRN | Assigned To | NDurner | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | Git master | ||||
| Summary | 0001573: Memory mapping offset misalignment | ||||
| Description | libextractor calls mmap() with an offset which is a multiple of the pagesize. This is correct for Linux ( http://linux.die.net/man/2/mmap ), but on Windows the equivalent function MapViewOfFile() requires the offset to be a multiple of the memory allocation granularity, which is obtained from dwAllocationGranularity member of a SYSTEM_INFO structure ( http://msdn.microsoft.com/en-us/library/aa366761%28VS.85%29.aspx ). | ||||
| Tags | No tags attached. | ||||
| Attached Files | win32_pagesize_to_allocationgranularity.diff (401 bytes)
Index: src/main/extractor.c
===================================================================
--- src/main/extractor.c (revision 11846)
+++ src/main/extractor.c (working copy)
@@ -2254,7 +2254,7 @@
pg = sysconf (_SC_PAGE_SIZE);
#else
GetSystemInfo(&sys);
- pg = sys.dwPageSize;
+ pg = sys.dwAllocationGranularity;
#endif
if ( (pg > 0) &&
(pg < MAX_READ) )
| ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-06-21 15:46 | LRN | New Issue | |
| 2010-06-21 15:46 | LRN | File Added: win32_pagesize_to_allocationgranularity.diff | |
| 2010-06-21 20:17 | NDurner | Note Added: 0004039 | |
| 2010-06-21 20:17 | NDurner | Assigned To | => NDurner |
| 2010-06-21 20:17 | NDurner | Status | new => feedback |
| 2010-07-29 15:59 | Christian Grothoff | Status | feedback => resolved |
| 2010-07-29 15:59 | Christian Grothoff | Resolution | open => fixed |
| 2010-10-21 15:47 | Christian Grothoff | Status | resolved => closed |