Skip to content

rusti always leaks memory and crashes #6378

Closed

Description

@cantsin

rusti on latest incoming (c081ffb) and master (f547a67) seems to always crash. Even simple expressions fail:

WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead.
rusti> 5
rust: ~"blocked = 0 this = 15e82c0"
rust: ~"blocked = 15e82c0 this = 15e82c0 old_task = 0"
rust: ~"no data available on &mut {header: {state: Blocked, blocked_task: (0x15e82c0 as *()), buffer: (0x7fb3f4204090 as *())}, payload: None}, going to sleep."
rust: ~"\"building driver input\""
rust: ~"inputting // Copyright 2012 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-lang.org/COPYRIGHT.\n//\n// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license\n// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your\n// option. This file may not be copied, modified, or distributed\n// except according to those terms.\n\n#[allow(ctypes)];\n#[allow(heap_memory)];\n#[allow(implicit_copies)];\n#[allow(managed_heap_memory)];\n#[allow(non_camel_case_types)];\n#[allow(non_implicitly_copyable_typarams)];\n#[allow(owned_heap_memory)];\n#[allow(path_statement)];\n#[allow(unrecognized_lint)];\n#[allow(unused_imports)];\n#[allow(vecs_implicitly_copyable)];\n#[allow(while_true)];\n\nextern mod std;\n\nfn print<T>(result: T) {\n    io::println(fmt!(\"%?\", result));\n}\n\nfn main() {\n\n\nprint({\n5\n})\n}"
rust: ~"\"building a driver session\""
rust: ~"\"building driver configuration\""
rust: ~"\"calling compile_upto\""
5
rust: ~"\"recording input into repl history\""
rust: ~"woke up, p.state = Full"
rusti> leaked memory in rust main loop (1 objects)
memory_region::~memory_region(): Assertion `false' failed.```

Activity

  1. cantsin commented on May 10, 2013

    @cantsin
    ContributorAuthor

    I tried to get at the precise problem, but I am not familiar with rust internals. My guess: it looks like the section that does "LLVM passes" in compile_rest (librustc/driver/driver.rs) is doing something wonky.

  2. added a commit that references this issue on May 11, 2013
    8ca64a4
  3. added a commit that references this issue on Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions