Repository navigation
Make sure munlock is called for ctx->buffer - #410
Conversation
|
FWIW, this might seem like a minor fix for general users, but when ran under Electron - |
|
Hi @indutny-signal - thanks for reporting this issue. I definitely agree this should be fixed up. May I ask when did you start seeing this crashing issue? I was just looking at the history and it looks like this behavior has been there for some time. |
|
@sjlombardo we started to see the issue after upgrade to electron@15.3.0 and after we started testing our app under playwright. I don't think playwright has any relevance here after debugging it, but electron update might be significant here. Thank you! |
|
Hi @indutny-signal - we're planning to merge this in. Just to confirm have you already tested that this code change fixes the issue you were seeing following the electron upgrade? |
|
Thanks so much. Yes, we patched it internally and tested heavily. No crashes due to mlock are happening anymore. |
ctx->bufferis allocated withsqlcipher_mallocwhich callsmlock()on the whole page, but whensqlcipher_freeis called with length0for thectx->buffer-munlock()doesn't get called anymore (because of the check insqlcipher_munlock).