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
Unaligned write in convertsimple() #94149
Comments
I do not think that it can be unaligned in a correct code. Could you please show us the caller code? I suspect it contains a bug. Most likely -- passes a pointer to 32-bit integer where the pointer to Py_ssize_t is expected. |
Hi Serhiy, thank you for taking a look at this. I'm unsure what information you're looking for that's not already contained in the two tracebacks I provided - the should have the entire call stack for both the native and Python sides, with locals. I was able to reproduce again with a simple clone from the reportlab master branch, with the below commands:
I can provide access to the live system this is occurring on if you do not have one to debug! |
Actually, based on what you mentioned here I took another look, and this indeed seems to be a bug in the downstream project. They are defining the length for a bytes-like object as an |
This actually fixes a real bug that normally only would have manifested under specific conditions (possibly crafted input file) but was revealed due to sparc's alignment requirements. Initially misidentified as a cpython bug [1] but the cpython devs helpfully clarified and pointed in the right direction [2]. [1] python/cpython#94141 [2] python/cpython#94149 Bug: https://bugs.gentoo.org/857408 Bug: https://bugs.gentoo.org/865051
This actually fixes a real bug that normally only would have manifested under specific conditions (possibly crafted input file) but was revealed due to sparc's alignment requirements. Initially misidentified as a cpython bug [1] but the cpython devs helpfully clarified and pointed in the right direction [2]. [1] python/cpython#94141 [2] python/cpython#94149 Bug: https://bugs.gentoo.org/857408 Bug: https://bugs.gentoo.org/865051
This actually fixes a real bug that normally only would have manifested under specific conditions (possibly crafted input file) but was revealed due to sparc's alignment requirements. Initially misidentified as a cpython bug [1] but the cpython devs helpfully clarified and pointed in the right direction [2]. [1] python/cpython#94141 [2] python/cpython#94149 Bug: https://bugs.gentoo.org/857408 Bug: https://bugs.gentoo.org/865051 Closes: #26970 Signed-off-by: Sam James <sam@gentoo.org>
While running the test suite for reportlab on sparc, an unaligned write is issued, which is fatal (SIGBUS) on the sparc architecture. I've submitted a fix in #94141, confirmed that it removes the crash and allows the entire reportlab test suite to pass, as well as passing the cpython test suite.
Error messages
py-bt.txt - this is a Python traceback of the crash site generated by gdb's
py-bt
command.bt-full.txt - traditional gdb backtrace.
Your environment
The text was updated successfully, but these errors were encountered: