Skip to content

rusti seg faults with non-ascii comments #8924

Closed

Description

@gifnksm

rusti 0.8-pre has this program.

$ rust -v
rust 0.8-pre (04fac7f 2013-08-31 15:15:40 -0700)
host: x86_64-unknown-linux-gnu

$ rusti
WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead. Type :help for help.
rusti> let a = 123; // 日本語
zsh: segmentation fault (core dumped)  rusti

$ rusti
WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead. Type :help for help.
rusti> let a = 123; // 中华
zsh: segmentation fault (core dumped)  rusti

$ rusti
WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead. Type :help for help.
rusti> let a = 123; // Việt Nam
zsh: segmentation fault (core dumped)  rusti

If the lines with non-ascii comments contain syntax error and the next line without errors nor comments, rusti causes seg faults.

$ rusti
WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead. Type :help for help.
rusti> lest a = 123; // 日本語
<anon>:2:6: 2:7 error: expected one of `; }` but found `a`
<anon>:2  lest a = 123; // 日本語
               ^
task <unnamed> failed at 'explicit failure', /home/nksm/pkg/rust/src/rust/src/libsyntax/diagnostic.rs:69
rusti> let a = 123;
zsh: segmentation fault (core dumped)  rusti

rusti 0.7 doesn't have this problem.

$ rust -v
rust 0.7
host: x86_64-unknown-linux-gnu

$ rusti
WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead. Type :help for help.
rusti> let a = 123; // 中华
rusti> let a = 123; // 日本語
rusti> let a = 123; // Việt Nam
rusti>

Activity

  1. klutzy commented on Sep 3, 2013

    @klutzy
    Contributor

    Does rusti work at all? Mine (73a28e5 / x86_64-unknown-linux-gnu) just segfaults with let a = 1; without comments.

  2. alexcrichton commented on Sep 3, 2013

    @alexcrichton
    Member

    Sadly rusti's tests are disabled (for being far too flaky), so it's very possible that it's not working. It sounded like @mrordinaire was going to start looking into rusti soon though.

  3. added a commit that references this issue on Oct 17, 2013
    386fa1d
  4. added a commit that references this issue on Jun 30, 2022
    88da5f2
  5. 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