[Webkit-unassigned] [Bug 280593] New: TextDecoder crashes with "RangeError: Bad value" after 2GB of text

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 29 16:52:00 PDT 2024


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

            Bug ID: 280593
           Summary: TextDecoder crashes with "RangeError: Bad value" after
                    2GB of text
           Product: WebKit
           Version: Safari 18
          Hardware: Mac (Apple Silicon)
                OS: macOS 15
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jacob at bandes-stor.ch

Created attachment 472732

  --> https://bugs.webkit.org/attachment.cgi?id=472732&action=review

Test page demonstrating error after 2GB of text decoding

TextDecoder seems to crash after processing 2GB of text in streaming mode.


## Steps to reproduce:

1. Create a 3GB test file using:  truncate -s 3G test.txt
2. Open textdecoder-test.html (attached to this bug) in Safari
3. Click "choose file" and select the test.txt created in step 1
4. Observe the progress bar stops at 2.00GB and then an error is logged to the console: "Unhandled Promise Rejection: RangeError: Bad value"


## Expected behavior:

No error -- should be able to continue parsing text beyond the 2GB range.


## Notes:

Works as expected in Chrome and Firefox.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240929/a160c398/attachment.htm>


More information about the webkit-unassigned mailing list