[Webkit-unassigned] [Bug 146473] Errors in read() are not handled in WTF::cryptographicallyRandomValuesFromOS.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 30 15:04:11 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=146473

Filip Pizlo <fpizlo at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #255860|review?, commit-queue?      |review-, commit-queue-
              Flags|                            |

--- Comment #4 from Filip Pizlo <fpizlo at apple.com> ---
Comment on attachment 255860
  --> https://bugs.webkit.org/attachment.cgi?id=255860
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=255860&action=review

> Source/WTF/wtf/OSRandomSource.cpp:53
> +NEVER_INLINE NO_RETURN_DUE_TO_CRASH static void crashUnableToOpenURandom()
> +{
> +    CRASH();
> +}
> +
> +NEVER_INLINE NO_RETURN_DUE_TO_CRASH static void crashUnableToReadFromURandom()
> +{
> +    CRASH();
> +}

Is there a good reason for these, isntead of just using CRASH or RELEASE_ASSERT_NOT_REACHED directly?

> Source/WTF/wtf/OSRandomSource.cpp:72
> +        if (currentRead < 0 && !(errno == EAGAIN || errno == EINTR))
> +            crashUnableToReadFromURandom();

This seems broken - if the currentRead is -1, then we don't want to add it to amountRead.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150630/6163da23/attachment.html>


More information about the webkit-unassigned mailing list