id
stringlengths
8
11
text
stringlengths
32
472
label
stringclasses
5 values
label_id
int64
0
4
rust_664
Internal compiler error in instantiate | It seems like this ought to compile... ``` fn echo[T](chan[T] c, chan[chan[T]] oc) { auto p = port[T](); oc <| chan(p); auto x; p |> x; c <| x; } ```
high
1
rust_665
Assertion failure: out_arg.mode != ty::mo_val | I'm guessing this should be caught earlier in the compiler. ``` fn main() { fn echo[T](chan[T] c, chan[chan[T]] oc) { let port[T] p = port(); oc <| chan(p); auto x; p |> x; c <| x; } auto p = port[int](); auto p2 = port[chan[int]](); spawn echo(chan(p), chan(p2)); } ```
medium
2
rust_666
"unsafe" doesn't sound unsafe enough | The compiler should accept both "unsafe" and "☢" as synonyms, and the pretty-printer should canonicalize to ☢. Implement this. | labels: A-Unicode
medium
2
rust_667
Destination-passing style | We should use destination-passing style throughout trans, to implement copy constructor elision. | labels: I-slow
medium
2
rust_668
Typestate isn't working for bind | This compiles and shouldn't. ``` fn foo() { auto bar; fn baz(int x) { } bind baz(bar); } ```
medium
2
rust_669
type "(option[int])[]" does not round-trip | Reduced from src/test/run-pass/alloca-from-derived-tydesc.rs ``` type r = (option[int])[]; ``` rustc --pretty normal ~/Desktop/a.rs > ~/Desktop/ap.rs ``` type r = option[int][]; ``` rustc ~/Desktop/ap.rs ``` ap.rs:1:21:1:22: error: expecting ;, found [ ``` Which is wrong, th...
medium
2
rust_670
expr "(@1).x" does not round-trip | ``` fn main() { (@1).x; } ``` pretty-prints as ``` fn main() { @).x; } ``` which is obviously wrong. | labels: A-pretty
medium
2
rust_671
pretty-printer turns #macro(...) into tup() | ``` fn main() { #macro("mylambda", x, body, {fn f(int x) -> int {ret body}; f}); assert(#mylambda(y,y*2)(8) == 16); } ``` becomes ``` fn main() { tup(); assert (#mylambda(y, y * 2)(8) == 16); } ``` | labels: A-pretty
medium
2
rust_672
pretty-printer screws up recs | ``` fn main() { rec(x=1234); } ``` becomes ``` fn main() { rec(x=234)); } ``` IOW "1234" becomes "234)".
medium
2
rust_673
Matching on a str should compare content, not identity | Either that, or we should disallow it altogether. The current behaviour, where you can put a str in a case pattern, but there's no way to guarantee that any other str will equal the literal you put in there, seems bogus.
medium
2
rust_674
pretty-printer omits semicolon needed to disambiguate unary op | ``` rustc --pretty normal src/test/run-pass/block-expr-precedence.rs ``` The last line, ``` if (true) { 12 };;; -num; ``` is pretty-printed as ``` if (true) { 12 } -num; ``` which, when parsed, hits the precedence issue described in the test's comment. | ...
medium
2
rust_675
parser rejects "fail []" | ``` fn main() { fail []; } ``` /Users/jruderman/Desktop/a.rs:2:9:2:10: error: expected ';' or '}' after expression but found [ The parser should accept this, leaving it for the type-checker to complain about. Found through AST fuzzing. | labels: A-frontend, E-easy
low
3
rust_676
Parser rejects "if (ret) { }" | ``` fn main() { if (ret) { } } ``` /Users/jruderman/Desktop/a.rs:2:15:2:16: error: unexpected token: ) This should be accepted by both the parser and the type-checker (but perhaps trigger a warning). Found through AST fuzzing. | labels: A-frontend, E-easy
low
3
rust_677
Compiler crashes displaying error line when compiling .rc files | When compiling a .rc file and there is an error in one of the .rs files. The compiler will crash when trying to use the codemap to display which line the error was on. Example: ``` ../src/lib/test.rs:82:23:82:52: error: unknown type in conversion: rt: d7...
medium
2
rust_678
Move semantics for cross-task operations | Channel operations (mainly sending) should have move semantics and only be allowed for unique things. This also applies to arguments to spawned functions, and probably the spawned function itself.
medium
2
rust_679
pretty-printer moves comments from inside array literal to outside | (e.g. near the top of src/test/bench/shootout/nbody.rs) | labels: A-pretty
medium
2
rust_680
Type of function tail expressions not inferred correctly | This doesn't typecheck: ``` fn f() -> int[] { ~[] } ``` This does: ``` fn f() -> int[] { ret ~[]; } ``` | labels: A-type-system
medium
2
rust_682
Per-thread Task Lists | We should use per-thread task lists. This means there will be a lot less contention on the scheduler lock, but it also makes load balancing harder. | labels: A-runtime
medium
2
rust_683
Move mode arguments | We want to be able to write functions like this: ``` fn foo(move int x) { } ``` | labels: A-frontend
medium
2
rust_684
Cannot build while offline | I pulled a few days ago, then tried to build while offline and got the following error: determined most recent snapshot: rust-stage0-2011-07-11-a84310a-macos-i386-e775077d87e508020d8e0282f944d66c89cae630.tar.bz2 curl: (6) Couldn't resolve host 'dl.rust-lang.org' Traceback (most r | labels: ...
low
3
rust_685
Use a single memory region | The current memory accounting stuff is going to have a lot of problems when we start moving heap-allocated values between tasks. We should simplify it by sharing the same memory region everywhere. | labels: A-runtime
medium
2
rust_687
rt: fatal, 'chan->task == task' failed in upcall_del_chan | Was trying to reproduce my mysterious double-free, found this instead. Single-threaded scheduler. Testcase: https://gist.github.com/1082006
medium
2
rust_688
main can't return int | When main is declared to return int, it always returns 0.
medium
2
rust_689
Add source level debugging info to LLVM output | In addition to being useful for debugging, this seems to be a prerequisite for generating gcov output.
medium
2
rust_690
Generate gcov coverage data | It would be nice to know what our test coverage looks like. I believe this depends on #689. | labels: A-testsuite, A-debuginfo, A-code-coverage
medium
2
rust_691
"typed" pretty printing mode fails with "unresolved name" for macros with variables | For example, in <pre> fn main() { #macro([#mylambda(x,body), {fn f(int x) -> int { ret body }; f}]); assert(#mylambda(y,y*2)(8) == 16); } </pre> It will produce "unresolved name" errors for x, body, and y. I'm not really sure if there...
medium
2
rust_693
Remove distinction between pred and fn | Writing pure predicates is pretty difficult and a pretty convincing argument was made recently that typestate predicates don't need to be pure. Removing the pred concept would simplify things a lot.
medium
2
rust_694
Preconditions on arguments don't satisfy subsequent calls with the same precondition | ``` pred p(int i) -> bool { true } fn f(int i) : p(i) -> int { i } fn g(int i) : p(i) -> int { f(i) } ``` Function g doesn't typecheck because the precondition on f isn't satisfied. I would expect this to work, otherwise I can't push...
medium
2
rust_696
Accessing an upvar in a for-each loop in an iterator triggers bounds check failure in trans | <pre> iter thing() -> uint {} iter thing2(uint j) -> uint { for each (uint i in thing()) { put j; } } fn main(){} </pre> Apparently we never do this? I tripped over it because a bug in some of my capture code introduced a bogu...
medium
2
rust_697
Defining a function that takes arguments inside a for-each loop fails during trans | <pre> iter thing() -> uint {} fn main() { for each (uint i in thing()) { fn foo(int x) -> int { ret x; } } } </pre> This is because collect_upvars thinks that x is an upvar of the for each body.
medium
2
rust_698
Double-free of ivecs when sending across channel | Finally found a minimal-ish testcase! This is blocking me from getting reading working for my async-io work https://gist.github.com/1083866
medium
2
rust_699
"quick start" wiki pages for the 3 major platforms | The "Getting started" page is getting too long and confusing. It would be nice to have separate instructions for Mac/Linux/Windows. We can still have a more detailed page for when the quick start page for one's own platform doesn't suffice. | labels: E-easy, A-LLVM
low
3
rust_700
This compiles and shouldn't. | ``` fn trans_send(&@block_ctxt cx, &@ast::expr lhs, &@ast::expr rhs, ast::node_id id) -> result { auto bcx = cx; auto chn = trans_expr(bcx, lhs); bcx = chn.bcx; auto data = trans_lval(bcx, rhs); bcx = data.res.bcx; auto chan_ty = node_id_type(cx.fcx.lcx.ccx, id); auto unit_ty; al | labels...
medium
2
rust_701
LLVM generates an undefined instruction for this test | ``` fn start() { } fn main() { child = spawn start(); auto child; } ``` | labels: A-LLVM
medium
2
rust_702
Correct "backwarding" behavior for self-calls in extended objects | See src/tests/run-pass/anon-obj-backwarding.rs for an example/description of this bug.
medium
2
rust_703
Overriding a method with one of a different type compiles and shouldn't | See src/comp/test/compile-fail/anon-obj-overloading-wrong-type.rs.
medium
2
rust_705
quick_sort returns incorrect results | std::sort::quick_sort sorts [2, 1, 3] as [1, 3, 2], for both the vec and ivec versions. ``` fn test_qsort() { auto names = ~[mutable 2, 1, 3]; auto expected = ~[1, 2, 3]; fn lteq(&int a, &int b) -> bool { int::le(a, b) } iqsort(lteq, names); auto pairs = ivec::zip(expected, ivec:
medium
2
rust_707
Self-calls in non-object context should fail with a helpful error message | This program fails with an uninformative explicit fail during typechecking. ``` fn main() { fn foo() -> int { ret 3(); } self.foo(); } ``` Fix on the way...
medium
2
rust_708
Report unresolved identifiers only once per function | GCC reports undeclared identifiers only once per function. IMHO we should do the same.
medium
2
rust_711
Bad type error message with parameterized types | This code: ``` use std; import std::option; fn bad() { let @option::t[int] rz = foo[uint](); } fn foo[ZZZ]() -> @option::t[ZZZ] { fail; } ``` fails with a type error: `error: mismatched types: expected @option::t[int] but found @option::t[ZZZ] (types differ)` This is a ...
medium
2
rust_712
Invalid memory access in fs::list_dir | Under valgrind `fs::list_dir(".")` says ``` ==16608== Invalid read of size 4 ==16608== at 0x495C205: os_fs::list_dir (in /home/banderson/Dev/rust/build/stage1/lib/libstd.so) ==16608== by 0x495F038: fs::list_dir (in /home/banderson/Dev/rust/build/stage1/lib/libstd.so) ==16608== by
medium
2
rust_713
Use millisecond resolution for --time-passes | So many of our passes are 0 seconds now that it would be more useful if --time-passes reported the milleseconds as well. | labels: E-easy
low
3
rust_714
Test run-pass/lib-run does not work on windows | I'm going to disable it on win32 because it keeps burning the tinderbox. Figure out what the deal is.
medium
2
rust_717
task-comm-11.rs doesn't work | This is a really simple test for sending channels over channels. It should work. It currently fails with valgrind errors, which seem to be caused by a double drop_glue on the channel that main receives from start. This test should be re-enabled once this functionality is fixed.
medium
2
rust_718
Segfault when wrapping an anon obj in more than one layer | The call to `my_c.foo()` in this program segfaults: ``` fn main() { obj a() { fn foo() -> int { ret 2; } } auto my_a = a(); auto my_b = obj() { with my_a }; assert (my_b.foo() == 2); auto my_c = obj() { with my_b }; assert (my_c.foo() == 2); } ``` | labels: I-...
high
1
rust_719
Not all paths return a value | ``` fn clone_chan[T](chan[T] c) -> chan[T] { unsafe::reinterpret_cast(rustrt::clone_chan(unsafe::reinterpret_cast(c))) } ``` There is only one path, and it returns, however, the compiler doesn't believe me. You can work around this by adding `ret`.
medium
2
rust_721
Test runner needs to be able to run unexported tests | Currently, tests have to be visible at the top level of the crate to be run, observing the normal rules for item visibility. In Rust we can have layers and layers of unexported modules - modules that still need to be tested. There are a few ways to allow these to b...
medium
2
rust_722
Build bots need a 'try' branch | Several people have desired to push an experimental branch to the build servers lately, and right now the only way to do that is to create a snapshot.
medium
2
rust_723
Add support for #[deprecated] attribute | Usage of items tagged with `#[deprecated]` should generate a warning at compile time. To make this really work correctly we'll need to write item attributes to the crate metadata. | labels: A-frontend, E-easy, T-rustdoc
question
4
rust_724
Enforce correct types for channels | This should fail to compile but currently doesn't. ``` fn start(chan[@int] c) { c <| @42; } fn main() { auto p = port(); auto child = spawn start(chan(p)); auto c; p |> c; log_err *c; } ``` This will probably be fixed when #568 is fixed. | labels: A-type-system
medium
2
rust_725
alias pass crashes when it needs to autoderef through multiple boxes | <pre> type quux = rec(int bar); fn g(&int i) { } fn f(@@quux foo) { g(foo.bar); } fn main() {} </pre> Yields <pre> rt: 8994:main:main: upcall fail 'non-exhaustive match failure', ../src/comp/middle/alias.rs:546 </pre> It is hitting a non-exhaustive ...
medium
2
rust_726
Test run-pass/lib-io doesn't work on mac | Please fix | labels: O-macos
medium
2
rust_727
_|_ (bottom) in an expression alt or if doesn't typecheck | ``` fn foo() -> int { ret alt true { true { 1 } false { fail; } }; } ``` ... produces `mismatched types: expected int but found () (types differ)` | labels: A-type-system
medium
2
rust_728
Loop constructs without parens | Now that we have if and alts without parens I find myself wanting to write loops without them as well. Is this possible?
medium
2
rust_729
Memory leak when declaring chans at the bottom of functions | The following program leaks `c` from `main`. ``` fn start(chan[chan[str]] c) { let port[str] p; p = port(); c <| chan(p); } fn main() { let port[chan[str]] p = port(); spawn start(chan(p)); p |> c; auto c; } ``` Interestingly, if you move the `auto c;` line ...
medium
2
rust_731
Names of function types shouldn't allow parameter names | `let fn(int x) a = f` is a valid declaration but the x is useless.
medium
2
rust_732
Test suite picks up too many files. | I had a `.#` file left over in my test directory from an old test I was working on in Emacs. When I did make check, I got an "error opening" error, instead of just ignoring this file and having the tests succeed. | labels: A-testsuite
medium
2
rust_733
Restore the ability to build run-pass/run-fail/bench tests without running them | Some of our tests have a default mode for running from the test suite, and an interactive mode for experimenting with (all the benchmarks). The conversion to a Rust-based test runner lost the ability to just compile the tests without runn...
low
3
rust_734
Test runner should run tests in parallel | labels: A-testsuite
medium
2
rust_735
run-pass/compile-fail, etc test runners no longer obey CFG_RUSTC_FLAGS | labels: A-testsuite
medium
2
rust_736
Investigate running tests under helgrind | I don't know much about this tool, but it might be useful for exercising our task system. | labels: A-testsuite, C-enhancement
low
3
rust_737
task-comm-15 fails when run with multiple threads | With RUST_THREADS=16, task-comm-15 occasionally produces valgrind errors like ``` ==8944== Thread 3: ==8944== Invalid read of size 4 ==8944== at 0x4AC73CD: pthread_mutex_lock (pthread_mutex_lock.c:50) ==8944== by 0x4A2E415: pthread_mutex_lock (forward.c:182) ==8944== ...
medium
2
rust_738
Add a build option to run compiler tests under gdb | The idea is that when a test fails you are immediately dumped into the debugger. | labels: A-testsuite, C-enhancement
low
3
rust_739
Automatically determine the number of CPU Cores | Instead of getting parallelism via `RUST_THREADS`, we should, by default, find the number of CPU cores and use that. We should keep `RUST_THREADS` around though, in case we want to run sequentially in some cases. This discussion seems to list how to do it on each of the...
question
4
rust_741
Compile tests race on environment variables when run in parallel | This sucks. Running "RUST_THREADS=16 make check" will occasionally cause run-pass, etc. tests to fail because they received the wrong LD_LIBRARY_PATH variable. | labels: A-testsuite
medium
2
rust_742
crash: "Out of stack space, sorry" with structural recursive type | The following program is sufficient to crash rustc: ``` tag expr { app(expr); } fn main() { } ``` This yields the following stack trace: ``` #0 0xf7fce5a1 in check_stack (task=0x87239e4) at ./src/rt/rust_upcall.cpp:30 #1 0xf7fce5d5 in upcall_get_type_d...
high
1
rust_743
crash: "UNREACHABLE executed at ObjectFile.cpp:52" | If you accidentally feed rustc --ls a non-object file (as I just did), you get this assertion failure: Unknown Object File Type UNREACHABLE executed at ObjectFile.cpp:52! Aborted (core dumped) You may also just get a plain segfault. For example, try an empty file :)....
high
1
rust_744
--lib should produce reasonable output file names | Right now, if you do "rustc --lib foo.rc", it will produce a library named "foo". It should produce a library named "libfoo.so" on linux and the equivalents on other platforms. | labels: E-easy, A-linkage
low
3
rust_745
Resolve resolves loop collection expr in wrong context | You can't currently do something like ``` for (int x in x) { ... } ``` because the loop variable will shadow the outer x.
medium
2
rust_746
Stop allowing duplicate label names in record types | ``` type x = rec(int x, int x); ``` This currently compiles. It shouldn't.
medium
2
rust_747
Nullary tags can be passed by mutable alias | <pre> use std; import std::option::*; fn mutator(&mutable t[@int] x) { x = some(@0); } fn main() { mutator(none); } </pre> passes the alias checker, but shouldn't. When the program is run, it leaks memory.
medium
2
rust_748
crash: upcall fail 'non-exhaustive match failure', src/comp/middle/resolve.rs:1148 | This tarball kills rustc with the above error: www.leptoquark.net/~elly/rustsocket-nematch.tar The stack trace is: #0 upcall_fail (task=0x87239e4, expr=0x86e3630 "non-exhaustive match failure", ``` file=0x86e3650 "src/comp/middle/resol...
medium
2
rust_749
Investigate running tests under Address Sanitizer | http://code.google.com/p/address-sanitizer/wiki/AddressSanitizer It finds use-after-free and out-of-bounds errors with very little overhead. Could be useful. | labels: A-testsuite, C-enhancement
low
3
rust_750
rustc segfaults when fed an empty file | labels: I-crash
high
1
rust_751
Beginning-of-line detection in pretty-printer isn't reliable | It only recognizes 'hard' line breaks. Spaces might also cause lines to be broken. This program ends up with an extra blank line above the comment because of this: ``` rust fn main() { let x = Foo {x: 10, y: 10000000000, // This a comment z: 450000000000000...
medium
2
rust_752
Bring the runtime tests up to date and start running them | The tests in src/rt/test are compiled but never run. It's almost certain that they are completely broken. Right now all they are accomplishing is making it difficult to change parts of the runtime. Replace it with a standard C++ unit testing framework and star...
low
3
rust_754
bind can't rebind an already bound function | It currently fails with an unimplemented error. The only snag is that the generated closures tydesc didn't include it. But I've fixed that, so there should be no reason I can't just remove the check.
medium
2
rust_755
Compile tests need to capture stderr | LLVM reports on stderr and right now those errors seem to be disappearing. | labels: A-testsuite
medium
2
rust_756
Typechecker overly restrictive on binding functions with type parametric arguments | The typechecker currently does not allow you to bind a function if one of the unbound arguments contains type parameters that are not passed by alias. There is no real reason for this restriction other than that the translator couldn't...
medium
2
rust_757
Spawn of type inferred variable trips error in typechecker | <pre> fn main() { let f = fn(){}; spawn f(); } </pre> Causes <pre> <input>:0:0:0:0: error: internal compiler error ret_ty_of_fn_ty() called on non-function type: <T0> </pre> | labels: A-type-system
high
1
rust_758
Using methods in a first-class manner doesn't work | ``` obj foo() { fn f() { } } fn main() { let my_foo = foo(); let f = my_foo.f; } ``` triggers ``` rustc: Instructions.cpp:968: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "P...
medium
2
rust_759
pp non-convergence: empty line becomes two empty lines | ``` fn a() -> uint { 1u } ``` becomes ``` fn a() -> uint { 1u } ``` | labels: A-pretty
medium
2
rust_760
pp screws up typestate assertions | ``` fn f(x: uint) : nonzero(x) { } ``` becomes ``` fn f(x: uint) : nonzero(0) { } ``` caught by running the fuzzer's convergence test on an unmodified ivec.rs
medium
2
rust_761
anonymous obj expression-statement is rejected | ``` fn main() { (obj () { }); } ``` pretty-prints as ``` fn main() { obj () { } } ``` which is rejected with the message "expecting ident", pointing at the "()" after "obj". I'm guessing this is a parser bug rather than a pretty-printer bug, since rust is mostly an expre...
medium
2
rust_762
parser rejects "ret ::f()" | ``` fn f() { } fn main() { ret ::f(); } ``` Is incorrectly rejected: ``` z.rs:2:16:2:18: error: expected ';' or '}' after expression but found :: z.rs:2 fn main() { ret ::f(); } ^~ ``` fwiw, if I put parens around the call, it's accepted. But the pretty-printer takes out the pare | labels: ...
low
3
rust_763
Channels leak when sent over channels | Minimal-ish test case: https://gist.github.com/1110969 If I reduce it further, it seems to either not reproduce or it will deadlock or it will crash. Hopefully all the same cause!
medium
2
rust_764
pp+parser disagree about parens around "fail" in callee position | This silly code fails with a type error: ``` fn main() { (fail)(1, 2); } z.rs:1:12:1:18: error: mismatched types: expected function or native function but found _|_ z.rs:1 fn main() { (fail)(1, 2); } ^~~~~~ ``` but if i pretty-print it, the parens aroun...
medium
2
rust_766
This code takes suspciously long to converge | ``` fn main() { ret (ret m) as int + 1; } fn main() { ret (ret m as int) + 1; } fn main() { ret ret m as int + 1; } fn main() { ret ret (m as int) + 1; } ``` The last one is finally stable, but it clearly doesn't do the same thing as the first line. | labels: A-pretty
medium
2
rust_768
"let f = @f;" causes iloop/irecurse | ``` fn main() { let f = @f; f(); } ``` Causes the compiler to iloop ``` fn main() { let f = @f; } ``` Causes the compiler to output "Out of stack space, sorry" Expected: "unresolved name: f" or "use before definition: f" or "cannot determine a type local variable: f". | labels: A-t...
high
1
rust_769
"alt ret" hits an error in llvm: "cast<Ty>() argument of incompatible type!" | ``` fn a() -> int { alt ret 1 { 2 { 3 } } } fn main() { a(); } ``` Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file llvm/include/llvm/Support/Casting.h, line 194.
question
4
rust_770
"i + ret i" hits assertion "Cannot create binary operator with two operands of differing type!" | ``` fn f(i: int) -> int { i + ret i; } fn main() { f(2); } ``` Assertion failed: (S1->getType() == S2->getType() && "Cannot create binary operator with two operands of differing type!"), function Create, file Instructions....
medium
2
rust_771
Calling an iter (as if it were a function) hits llvm assert | ``` iter i() { } fn main() { i(); } ``` Assertion failed: ((NumParams == FTy->getNumParams() || (FTy->isVarArg() && NumParams > FTy->getNumParams())) && "Calling a function with bad signature!"), function init, file Instructions.cpp, line 187. | labels: A-ty...
medium
2
rust_772
non-exhaustive match failure in alias::check_for_each | ``` fn main() { for each p in 1 {} } ``` rt: b1ff:main:main: upcall fail 'non-exhaustive match failure', ../src/comp/middle/alias.rs:336 rt: b1ff:main: domain main @0x200b40c root task failed The proximate cause is that in comp::middle::alias::check_for_each, "alt...
medium
2
rust_773
"put put ()" hits llvm assert "Invalid type for pointer element!" | ``` iter i() { put put (); } fn main() { } ``` Assertion failed: (isValidElementType(EltTy) && "Invalid type for pointer element!"), function get, file Type.cpp, line 664. Seems like valid rust code to me, which puts () twice.
medium
2
rust_774
trans_put 'non-exhaustive match failure' in non-iter fn | ``` fn foo() { put() } fn main() { foo(); } ``` rt: 0790:main:main: upcall fail 'non-exhaustive match failure', ../src/comp/middle/trans.rs:5523 rt: 0790:main: domain main @0x2008c0c root task failed Should have been rejected prior to trans, I think. | labels: A...
medium
2
rust_775
"Calling a function with a bad signature!" with uncalled type-parameteric function | ``` fn empty[T]() -> vec[T] { ret []; } fn main() { empty[int]; } ``` Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!"), function init, file Ins...
medium
2
rust_776
LLVM assert "May only branch on boolean predicates!" with bang predicate | ``` fn my_err(s: str) -> ! { log_err s; fail; } fn main() { if my_err("bye") { } } ``` Assertion failed: (getCondition()->getType()->isIntegerTy(1) && "May only branch on boolean predicates!"), function AssertOK, file Instructions.cpp, line 669.
medium
2
rust_777
ret-bang variant trips llvm assert "Invalid constantexpr cast!" | ``` fn my_err(s: str) -> ! { log_err s; fail; } fn main() { my_err("bye") == 3u; } ``` Assertion failed: (CastInst::castIsValid(opc, C, Ty) && "Invalid constantexpr cast!"), function getCast, file Constants.cpp, line 1217.
medium
2
rust_778
"pointer being freed was not allocated" when triggering out-of-stack-space compiler bug | ``` tag clam[T] { a(T); } fn main() { let c = a(c); alt c { a[int](_) { } } } ``` Compiling it gives "Out of stack space, sorry" (which is probably the same problem as #768). Compiling it ALSO triggers "rustc(21383,0xb0509000) mal...
medium
2
rust_779
implicit ret is incorrectly allowed in bang function | ``` fn f() -> ! { 3 } fn main(){} ``` should be rejected with "In non-returning function f, some control paths may return to the caller" but instead it gets through until llvm complains: Assertion failed: (getOperand(0)->getType() == cast<PointerType>(getOperand(1)...
medium
2