Skip to content

Commit e5521aa

Browse files
committed
AST fuzzer: remove ignores for fixed issues; update issue URLs
1 parent f455dc1 commit e5521aa

File tree

1 file changed

+20
-43
lines changed

1 file changed

+20
-43
lines changed

src/fuzzer/fuzzer.rs

Lines changed: 20 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn contains(haystack: str, needle: str) -> bool {
2121

2222
fn find_rust_files(&files: [str], path: str) {
2323
if str::ends_with(path, ".rs") && !contains(path, "utf8") {
24-
// ignoring "utf8" tests: https://github.com/graydon/rust/pull/1470 ?
24+
// ignoring "utf8" tests because something is broken
2525
files += [path];
2626
} else if fs::path_is_dir(path)
2727
&& !contains(path, "compile-fail")
@@ -75,10 +75,10 @@ pure fn safe_to_use_expr(e: ast::expr, tm: test_mode) -> bool {
7575
ast::expr_for(_, _, _) { false }
7676
ast::expr_while(_, _) { false }
7777

78-
// https://github.com/graydon/rust/issues/955
78+
// https://github.com/mozilla/rust/issues/955
7979
ast::expr_do_while(_, _) { false }
8080

81-
// https://github.com/graydon/rust/issues/929
81+
// https://github.com/mozilla/rust/issues/929
8282
ast::expr_cast(_, _) { false }
8383
ast::expr_assert(_) { false }
8484
ast::expr_binary(_, _, _) { false }
@@ -88,17 +88,17 @@ pure fn safe_to_use_expr(e: ast::expr, tm: test_mode) -> bool {
8888
ast::expr_fail(option::none) { false }
8989
ast::expr_ret(option::none) { false }
9090

91-
// https://github.com/graydon/rust/issues/953
91+
// https://github.com/mozilla/rust/issues/953
9292
ast::expr_fail(option::some(_)) { false }
9393

94-
// https://github.com/graydon/rust/issues/927
94+
// https://github.com/mozilla/rust/issues/927
9595
//ast::expr_assert(_) { false }
9696
ast::expr_check(_, _) { false }
9797

98-
// https://github.com/graydon/rust/issues/928
98+
// https://github.com/mozilla/rust/issues/928
9999
//ast::expr_cast(_, _) { false }
100100

101-
// https://github.com/graydon/rust/issues/1458
101+
// https://github.com/mozilla/rust/issues/1458
102102
ast::expr_call(_, _, _) { false }
103103

104104
_ { true }
@@ -110,15 +110,15 @@ pure fn safe_to_use_expr(e: ast::expr, tm: test_mode) -> bool {
110110

111111
fn safe_to_steal_ty(t: @ast::ty, tm: test_mode) -> bool {
112112
alt t.node {
113-
// https://github.com/graydon/rust/issues/971
113+
// https://github.com/mozilla/rust/issues/971
114114
ast::ty_constr(_, _) { false }
115115

116116
// Other restrictions happen to be the same.
117117
_ { safe_to_replace_ty(t.node, tm) }
118118
}
119119
}
120120

121-
// Not type-parameterized: https://github.com/graydon/rust/issues/898
121+
// Not type-parameterized: https://github.com/mozilla/rust/issues/898 (FIXED)
122122
fn stash_expr_if(c: fn@(@ast::expr, test_mode)->bool,
123123
es: @mutable [ast::expr],
124124
e: @ast::expr,
@@ -154,7 +154,7 @@ fn steal(crate: ast::crate, tm: test_mode) -> stolen_stuff {
154154

155155
fn safe_to_replace_expr(e: ast::expr_, _tm: test_mode) -> bool {
156156
alt e {
157-
// https://github.com/graydon/rust/issues/652
157+
// https://github.com/mozilla/rust/issues/652
158158
ast::expr_if(_, _, _) { false }
159159
ast::expr_block(_) { false }
160160

@@ -344,19 +344,18 @@ fn check_running(exe_filename: str) -> happiness {
344344
} else if contains(comb, "leaked memory in rust main loop") {
345345
// might also use exit code 134
346346
//failed("Leaked")
347-
known_bug("https://github.com/graydon/rust/issues/910")
347+
known_bug("https://github.com/mozilla/rust/issues/910")
348348
} else if contains(comb, "src/rt/") {
349349
failed("Mentioned src/rt/")
350350
} else if contains(comb, "malloc") {
351-
//failed("Mentioned malloc")
352-
known_bug("https://github.com/graydon/rust/issues/1461")
351+
failed("Mentioned malloc")
353352
} else {
354353
alt p.status {
355354
0 { passed }
356355
100 { cleanly_rejected("running: explicit fail") }
357356
101 | 247 { cleanly_rejected("running: timed out") }
358-
245 | 246 | 138 | 252 { known_bug("https://github.com/graydon/rust/issues/1466") }
359-
136 | 248 { known_bug("SIGFPE - https://github.com/graydon/rust/issues/944") }
357+
245 | 246 | 138 | 252 { known_bug("https://github.com/mozilla/rust/issues/1466") }
358+
136 | 248 { known_bug("SIGFPE - https://github.com/mozilla/rust/issues/944") }
360359
rc { failed("Rust program ran but exited with status " + int::str(rc)) }
361360
}
362361
}
@@ -369,36 +368,20 @@ fn check_compiling(filename: str) -> happiness {
369368

370369
//#error("Status: %d", p.status);
371370
if p.err != "" {
372-
if contains(p.err, "Ptr must be a pointer to Val type") {
373-
known_bug("https://github.com/graydon/rust/issues/897")
374-
} else if contains(p.err, "Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && \"Calling a function with a bad signature!\"), function init") {
375-
known_bug("https://github.com/graydon/rust/issues/1459")
371+
if false {
372+
known_bug("...")
376373
} else {
377374
log(error, "Stderr: " + p.err);
378375
failed("Unfamiliar error message")
379376
}
380377
} else if p.status == 0 {
381378
passed
382-
} else if contains(p.out, "Out of stack space, sorry") {
383-
known_bug("Recursive types - https://github.com/graydon/rust/issues/742")
384379
} else if contains(p.out, "Assertion") && contains(p.out, "failed") {
385380
log(error, "Stdout: " + p.out);
386381
failed("Looks like an llvm assertion failure")
387382

388-
} else if contains(p.out, "upcall fail 'option none'") {
389-
known_bug("https://github.com/graydon/rust/issues/1463")
390-
} else if contains(p.out, "upcall fail 'non-exhaustive match failure', ../src/comp/middle/typeck.rs:1554") {
391-
known_bug("https://github.com/graydon/rust/issues/1462")
392-
} else if contains(p.out, "upcall fail 'Assertion cx.fcx.llupvars.contains_key(did.node) failed'") {
393-
known_bug("https://github.com/graydon/rust/issues/1467")
394383
} else if contains(p.out, "Taking the value of a method does not work yet (issue #435)") {
395-
known_bug("https://github.com/graydon/rust/issues/435")
396-
} else if contains(p.out, "internal compiler error bit_num: asked for pred constraint, found an init constraint") {
397-
known_bug("https://github.com/graydon/rust/issues/933")
398-
} else if contains(p.out, "internal compiler error") && contains(p.out, "called on non-fn type") {
399-
known_bug("https://github.com/graydon/rust/issues/1460")
400-
} else if contains(p.out, "internal compiler error fail called with unsupported type _|_") {
401-
known_bug("https://github.com/graydon/rust/issues/1465")
384+
known_bug("https://github.com/mozilla/rust/issues/435")
402385
} else if contains(p.out, "internal compiler error unimplemented") {
403386
known_bug("Something unimplemented")
404387
} else if contains(p.out, "internal compiler error") {
@@ -455,7 +438,6 @@ fn has_raw_pointers(c: ast::crate) -> bool {
455438
fn content_is_dangerous_to_run(code: str) -> bool {
456439
let dangerous_patterns =
457440
["xfail-test",
458-
"-> !", // https://github.com/graydon/rust/issues/897
459441
"import", // espeically fs, run
460442
"native",
461443
"unsafe",
@@ -467,12 +449,7 @@ fn content_is_dangerous_to_run(code: str) -> bool {
467449

468450
fn content_is_dangerous_to_compile(code: str) -> bool {
469451
let dangerous_patterns =
470-
["xfail-test",
471-
"-> !", // https://github.com/graydon/rust/issues/897
472-
"enum", // typeck hang with ty variants: https://github.com/graydon/rust/issues/742 (from dup #900)
473-
"with", // tstate hang with expr variants: https://github.com/graydon/rust/issues/948
474-
"import comm" // mysterious hang: https://github.com/graydon/rust/issues/1464
475-
];
452+
["xfail-test"];
476453

477454
for p: str in dangerous_patterns { if contains(code, p) { ret true; } }
478455
ret false;
@@ -486,7 +463,7 @@ fn content_might_not_converge(code: str) -> bool {
486463
"spawn", // precedence issues?
487464
"bind", // precedence issues?
488465
" be ", // don't want to replace its child with a non-call: "Non-call expression in tail call"
489-
"\n\n\n\n\n" // https://github.com/graydon/rust/issues/850
466+
"\n\n\n\n\n" // https://github.com/mozilla/rust/issues/850
490467
];
491468

492469
for p: str in confusing_patterns { if contains(code, p) { ret true; } }
@@ -541,7 +518,7 @@ fn check_convergence(files: [str]) {
541518
let s = @result::get(io::read_whole_file_str(file));
542519
if !content_might_not_converge(*s) {
543520
#error("pp converge: %s", file);
544-
// Change from 7u to 2u once https://github.com/graydon/rust/issues/850 is fixed
521+
// Change from 7u to 2u once https://github.com/mozilla/rust/issues/850 is fixed
545522
check_roundtrip_convergence(s, 7u);
546523
}
547524
}

0 commit comments

Comments
 (0)