summaryrefslogtreecommitdiffstats
path: root/dom/file/tests/crashtests
diff options
context:
space:
mode:
Diffstat (limited to 'dom/file/tests/crashtests')
-rw-r--r--dom/file/tests/crashtests/1480354.html14
-rw-r--r--dom/file/tests/crashtests/1562891.html16
-rw-r--r--dom/file/tests/crashtests/1747185.html11
-rw-r--r--dom/file/tests/crashtests/1748342.html26
-rw-r--r--dom/file/tests/crashtests/crashtests.list4
5 files changed, 71 insertions, 0 deletions
diff --git a/dom/file/tests/crashtests/1480354.html b/dom/file/tests/crashtests/1480354.html
new file mode 100644
index 0000000000..19e53bb1ca
--- /dev/null
+++ b/dom/file/tests/crashtests/1480354.html
@@ -0,0 +1,14 @@
+<html>
+<body>
+ <script>
+function createBlob(blocksize) {
+ var blob = new Blob();
+ while (blob.size < 25 * 1024 * 1024) { // 25 MB
+ blob = new Blob([blob, new Uint8Array(blocksize)]);
+ }
+ URL.createObjectURL(blob);
+}
+createBlob(1024 * 25);
+ </script>
+</body>
+</html>
diff --git a/dom/file/tests/crashtests/1562891.html b/dom/file/tests/crashtests/1562891.html
new file mode 100644
index 0000000000..fff7606a8a
--- /dev/null
+++ b/dom/file/tests/crashtests/1562891.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+ <script>
+ function start () {
+ const canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas')
+ SpecialPowers.forceGC();
+ canvas.toBlob(function (blob) {
+ blob.stream()
+ blob.arrayBuffer().then(() => {})
+ })
+ }
+
+ window.addEventListener('load', start)
+ </script>
+</head>
+</html>
diff --git a/dom/file/tests/crashtests/1747185.html b/dom/file/tests/crashtests/1747185.html
new file mode 100644
index 0000000000..89af55504f
--- /dev/null
+++ b/dom/file/tests/crashtests/1747185.html
@@ -0,0 +1,11 @@
+<html>
+<head>
+ <script>
+ window.addEventListener('load', () => {
+ let a = new Blob([new Uint8Array(2147483647)])
+ let b = new File([a], '')
+ b.stream()
+ })
+ </script>
+</head>
+</html>
diff --git a/dom/file/tests/crashtests/1748342.html b/dom/file/tests/crashtests/1748342.html
new file mode 100644
index 0000000000..5f0811b5bb
--- /dev/null
+++ b/dom/file/tests/crashtests/1748342.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script id="worker1" type="javascript/worker">
+ self.onmessage = async function (e) {
+ self.close()
+ const reader = new FileReader()
+ for (let i = 0; i < 25; i++) {
+ try { reader.readAsBinaryString(e.data[0]) } catch (e) {}
+ }
+ reader.addEventListener("progress", () => {}, {})
+ }
+ </script>
+ <script>
+ window.addEventListener("load", () => {
+ const script = new Blob([document.querySelector("#worker1").textContent], { type: "text/javascript" })
+ const worker = new Worker(window.URL.createObjectURL(script))
+ const data = new Blob(["70𯸟\nℽ㮼٠𛪇\0𛃧كe۰҅妽󠶖󠙻𝅧𡴶𝌋쮁偵9󠰾󠋼7\r𐇽0🥂.\b፟+⍳፟D󠢪3𣚽󠜎🐾�c_߰a<<=𝅦9𝆭𛰅9󠵼ௌ󠌌𖓄ΐ0�⡖‑뢈/-᭰*٠٪᷁e �𯯐𯬓𯕏‫‑걢V*=­￿**󠛐\u2028שּׁ&‭0󠄯𒡯e\n𛰵󠥿⁤𫍰,󠶒𝅥t\nl𧶈a𦜠09k𯔆䴋�|󠄷🦻𛝫󠁥𖭄", "*𒗬۰0\u2029‌/\n\r+󠎔𖼣k*=🿹𯀊\r٪\r󠳐𝲍慑B�\r󠮱\r\n\"\r\\𯉆۹c卑4󠣰󠻬鴗ꛌ\0⌕:\r\n𝚨9ꛅ٠󠃭𯋾\nJ󠯲9\r゙鈷P\u2029҉󠷒۹e \b緁︡𤆥^𯏂゚੿|٫󠕉揅ᷛ𩊜s𯑳2凅9c8H𦰤-\f%٠𨮫󠚵‑2𫈮P𝋄窥57\n-゙҄H󠭗𯪞𣃂-ᷢשּׁ貌솽|𝉃‬c㙡𯐉᭯mL\r"], {
+ "type": "image/png",
+ "endings": "transparent"
+ })
+ worker.postMessage([data], [])
+ })
+ </script>
+</head>
+</html>
diff --git a/dom/file/tests/crashtests/crashtests.list b/dom/file/tests/crashtests/crashtests.list
new file mode 100644
index 0000000000..22eec1962e
--- /dev/null
+++ b/dom/file/tests/crashtests/crashtests.list
@@ -0,0 +1,4 @@
+skip-if(ThreadSanitizer) load 1480354.html
+load 1562891.html
+skip-if(Android||ThreadSanitizer) load 1747185.html # Crashes on Android, times out on TSan.
+load 1748342.html