Issue 10916: mmap segfault - Python tracker
Issue10916
Created on 2011-01-15 15:18 by rosslagerwall, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| mmap.patch | rosslagerwall, 2011-01-15 15:18 | |||
| Messages (3) | |||
|---|---|---|---|
| msg126334 - (view) | Author: Ross Lagerwall (rosslagerwall) ![]() |
Date: 2011-01-15 15:18 | |
If a mmap length 0 is used and an offset is used as well, the size to mmap() is calculated as the size of the file instead of the size of the file minus offset. This means that trying to access a certain part does not result in an index error but a segfault (bus error). Attached is a patch that fixes the issue + a unit test. |
|||
| msg126337 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2011-01-15 16:19 | |
Thanks for the patch. Committed in r88022 (3.2), r88023 (3.1) and r88024 (2.7). |
|||
| msg126343 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2011-01-15 17:40 | |
It also needed fixing on Windows: committed in r88036, r88037 and r88038. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:11 | admin | set | github: 55125 |
| 2011-01-15 17:40:16 | pitrou | set | nosy:
loewis, amaury.forgeotdarc, pitrou, r.david.murray, rosslagerwall messages: + msg126343 |
| 2011-01-15 16:19:28 | pitrou | set | status: open -> closed nosy: loewis, amaury.forgeotdarc, pitrou, r.david.murray, rosslagerwall messages: + msg126337 resolution: fixed |
| 2011-01-15 15:18:57 | rosslagerwall | create | |
