Closed
Description
When I try to run the following program it crashes with an error message from glibc.
fn main() {
let s = "hej";
while s != "" {
ret;
}
}
The error message is
*** glibc detected *** ./crash: double free or corruption (fasttop): 0x0000000001a2c7d0 ***
I tried running the program with valgrind. It then produced a different error message:
rust: fatal, 'live_allocs < 1' failed, ./src/rt/memory_region.cpp:54
If I change the loop to "while true", the program finishes without error.