Message219587
Given the following code, tracemalloc crashes with:
"Floating point exception: 8 (core dumped)"
import tracemalloc
tracemalloc.start(10)
import io
io.StringIO()
The culprit is this line "assert(nelem <= PY_SIZE_MAX / elsize);" from tracemalloc_alloc. elsize is 0 from stringio.c, "self->buf = (Py_UCS4 *)PyMem_Malloc(0);".
The attached patch skips the assert if elsize is 0, but I don't know if this is the right approach.
Thanks! |
|
Date |
User |
Action |
Args |
2014-06-02 13:52:04 | Claudiu.Popa | set | recipients:
+ Claudiu.Popa, vstinner |
2014-06-02 13:52:03 | Claudiu.Popa | set | messageid: <1401717123.97.0.114910217041.issue21639@psf.upfronthosting.co.za> |
2014-06-02 13:52:03 | Claudiu.Popa | link | issue21639 messages |
2014-06-02 13:52:03 | Claudiu.Popa | create | |
|