[issue30297] Recursive starmap causes Segmentation fault

Sebastian Noack report at bugs.python.org
Tue May 9 02:04:12 EDT 2017


Sebastian Noack added the comment:

Thanks for your response, both of you. All you said, make sense.

Just for the record, I wouldn't necessarily expect 200k nested iterators to work. Even if it could be made work, I guess it would use way too much memory. But a RuntimeError would be much preferable over a crash.

For the code above, the fix would be to just immediately convert the iterator returned by starmap() to a list. But in the end, regardless of this additional operation, it didn't perform well, so that I tossed that code, and used openssl's PBKDF2 implementation through the ctypes module.

Still, I'm somewhat concerned that code like this, will cause an unexpected crash that cannot be handled, dependent on run time variables. Could this perhaps even provide a security vulnerability? It seems to be a buffer overflow, after all.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30297>
_______________________________________


More information about the Python-bugs-list mailing list