Skip to content

invalid format string causes leaked memory in rust main loop #1299

Closed
@grahame

Description

@grahame

The following program;

use std;
import std::io;

fn main(arg : [str])
{
std::io::println(#fmt("%r", "Goat"));
}

fails to compile with the following internal error:

herugrim::~/code/markov2 $ rustc markov.rs
markov.rs:6:26: 6:30 error: unknown type in conversion: r
markov.rs:6 std::io::println(#fmt("%r", "Goat"));
^~~~
rust: upcall fail 'explicit failure', src/comp/driver/session.rs:70
rust: domain main @0x7fd001021200 root task failed
rust: fatal, 'leaked memory in rust main loop (2 objects)' failed, ./src/rt/memory_region.cpp:158 2 objects

I'm on MacOS lion, and I'm running rev 283cf35 of rust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions