Skip to content

Instantly share code, notes, and snippets.

@kuu

kuu/GM issue Secret

Created September 12, 2014 05:29
Show Gist options
  • Save kuu/778932bdb48ca2bb7988 to your computer and use it in GitHub Desktop.
Save kuu/778932bdb48ca2bb7988 to your computer and use it in GitHub Desktop.
Following code causes iOS8 GM seed's Safari to crash.
<!DOCTYPE html>
<script>
function tick() {
var tArray = new Array(0xFFFFF);
for (var i = 0, il = tArray.length; i < il; i++) {
tArray[i] = 0;
}
tArray.length = 0;
delete tArray;
setTimeout(tick, 30);
}
tick();
</script>
@kuu
Copy link
Author

kuu commented Sep 12, 2014

The issue only occurs with iPhone 5 and 4S, and not occur with iPhone 5S.

@Moncader
Copy link

Note that the delete tArray nor the resetting of the tArray is not required to make things crash.

@Moncader
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment