Issue 5292: mmap crashes just on boundary. (original) (raw)
Issue5292
This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/49542
classification
Title: | mmap crashes just on boundary. | ||
---|---|---|---|
Type: | crash | Stage: | |
Components: | Extension Modules | Versions: | Python 3.0, Python 3.1, Python 2.7, Python 2.6 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | Nosy List: | ocean-city | |
Priority: | normal | Keywords: | patch |
Created on 2009-02-17 09:35 by ocean-city, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Files | |||
---|---|---|---|
File name | Uploaded | Description | Edit |
fix_segfault_on_boundary.patch | ocean-city,2009-02-17 09:42 |
Messages (3) | ||
---|---|---|
msg82307 - (view) | Author: Hirokazu Yamamoto (ocean-city) * ![]() |
Date: 2009-02-17 09:35 |
I noticed following code crashes. I'll post fix soon. import mmap import os def main(): align = mmap.ALLOCATIONGRANULARITY path = os.path.splitext(__file__)[0] + ".txt" with open(path, "w") as f: f.write("0" * align) f.write("1" * align) f.write("2" * align) with open(path, "r+") as f: m = mmap.mmap(f.fileno(), align) m[align] # crash m[align] = '1' # crash too if __name__ == '__main__': main() | ||
msg82308 - (view) | Author: Hirokazu Yamamoto (ocean-city) * ![]() |
Date: 2009-02-17 09:42 |
Here is a patch. | ||
msg82314 - (view) | Author: Hirokazu Yamamoto (ocean-city) * ![]() |
Date: 2009-02-17 10:13 |
This is obvious bug (and fix is obvious too), so I've commited in r69714. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:45 | admin | set | github: 49542 |
2009-02-17 10:13:42 | ocean-city | set | status: open -> closedresolution: fixedmessages: + |
2009-02-17 09:42:11 | ocean-city | set | files: + fix_segfault_on_boundary.patchkeywords: + patchmessages: + |
2009-02-17 09:35:55 | ocean-city | create |
Supported by The Python Software Foundation,
Powered by Roundup
Copyright © 1990-2022, Python Software Foundation
Legal Statements