Message330830
> why was that only an issue on 2.7?
I added PyMem_RawMalloc() to Python 3.4 and this function must be thread-safe.
https://docs.python.org/dev/c-api/memory.html#raw-memory-interface
"These functions are thread-safe, the GIL does not need to be held."
I replaced PyMem_RawMalloc() with PyMem_Malloc() when I backported the change, but I didn't know that PyMem_Malloc() isn't thread-safe *in debug mode*!
Gregory: do you think that it would be be crazy to fix PyMem_Malloc() to make it thread-safe in debug mode as well? I implemented a fix: PR 10828. |
|
Date |
User |
Action |
Args |
2018-11-30 22:53:05 | vstinner | set | recipients:
+ vstinner, gregory.p.smith, pitrou, benjamin.peterson, skrah, serhiy.storchaka, steve.dower, siddhesh, izbyshev, miss-islington |
2018-11-30 22:53:05 | vstinner | set | messageid: <1543618385.35.0.788709270274.issue33015@psf.upfronthosting.co.za> |
2018-11-30 22:53:05 | vstinner | link | issue33015 messages |
2018-11-30 22:53:05 | vstinner | create | |
|