-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSV write has SEGV when trying to write data 2GB or larger #129409
Comments
I think the issue is here: https://github.com/python/cpython/blob/3.12/Modules/_csv.c#L1077 this uses an int for variable i, which is likely 32 bits while Py_ssize_t is 64 bits so it likely overflows. |
When I patched it locally and built from source it fixes the problem:
|
I agree, since |
…than 2GB in CSV file (pythonGH-129413) (cherry picked from commit 97b0ef0) Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com>
…than 2GB in CSV file (pythonGH-129413) (cherry picked from commit 97b0ef0) Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com>
Thanks for the report and detailed analysis, @bdrosen96! |
Crash report
What happened?
This happens with both 3.10 and 3.12
When I reproduce this with python-dbg inside of gdb I see the following:
CPython versions tested on:
3.12
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.12.8 (main, Dec 4 2024, 08:54:12) [GCC 11.4.0]
Linked PRs
The text was updated successfully, but these errors were encountered: