Skip to content

Conversation

@warner
Copy link

@warner warner commented Jul 8, 2013

The core loop had too many generators: chaining them together results in high stack usage (and reduced speed) when called with a high number of iterations. At roughly 88000 iterations, python segfaults.

Removing those extra stack frames also appears to speed up the loop by about 5%

This fixes #2.

The core loop had too many generators: chaining them together results in high stack usage (and reduced speed) when called with a high number of iterations. At roughly 88000 iterations, python segfaults.

Removing those extra stack frames also appears to speed up the loop by about 5%

This fixes mitsuhiko#2.
@wvh
Copy link

wvh commented Sep 30, 2013

I also get a segfault starting at 74790 iterations while comparing against the openssl pbkdf2 function – I'm not actually planning on using such a high iteration count.

from pbkdf2 import pbkdf2_hex
pbkdf2_hex('hello', '', 74790, 48)

Segmentation fault

@kitschpatrol
Copy link

Would be great if this could be merged and pushed up to PIP. Fixes issues in some other projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segmentation Fault with high iterations

3 participants