DomBlack / php-scrypt

A PHP wrapper fo the scrypt hashing algorithm
Other
209 stars 57 forks source link

Modified crypto_scrypt-sse to use emalloc #32

Closed ghost closed 10 years ago

ghost commented 10 years ago

My system defaults to using the SSE variant which was still using either posix_memalign or malloc[not sure which path it was taking].

Consequently, it would ignore PHP's max memory limits and would not be reported for get_memory_usage

This change merely replaces the calls to malloc with emalloc. I tried using safe_emalloc but kept getting segmentation faults.

DomBlack commented 10 years ago

This change is causing segfaults in various versions of PHP - see Travis

ghost commented 10 years ago

Closing this for now. BTW, how did you determine the replacements for safe_emalloc? I thought the replacement calls were supposed to have the value from the +x as the third param but you had them as 0