[SR-4308] Closure + SecRandomCopyBytes doesn't generate random bytes with -O/-OWholeModule #46891
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
optimized only
Flag: An issue whose reproduction requires optimized compilation
Environment
Xcode 8.2
Additional Detail from JIRA
md5: 13c08eefc137d5df2e8e69a322409019
Issue Description:
I apologize in advance as I'm not 100% certain if it's either the SecRandomCopyBytes call or the closures it's wrapped in but it seems that when -O or -OWholeModule is enabled, the random bytes generated by SecRandomCopyBytes results in a bunch of "A" strings when the bytes are converted to a base64 string.
The code I was able to reproduce this issue with is located here: mozilla-mobile/firefox-ios#2544
If needed, I can distill this down into a test project that only uses this method to reproduce this case.
The text was updated successfully, but these errors were encountered: