js/src/jit-test/tests/basic/bug639311.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/basic/bug639311.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,18 @@
     1.4 +/* Avoid use-after-free while sweeping type objects. */
     1.5 +
     1.6 +try {
     1.7 +  Reflparse("")
     1.8 +} catch(e) {}
     1.9 +Reflect.parse("for(var a;a;j){if(a%2==0){c()}}")
    1.10 +try {
    1.11 +  (function() {
    1.12 +    for (a = 0;; j) {
    1.13 +      gc()
    1.14 +    }
    1.15 +  })()
    1.16 +} catch(e) {
    1.17 +  delete this.Math
    1.18 +}
    1.19 +gc()
    1.20 +Reflect.parse("let(x){}")
    1.21 +gc()

mercurial