Skip to content

rustc --print crashes for some options when piped into a process not listening on STDIN #44492

Closed
@mcdenhoed

Description

@mcdenhoed

Some options for the command rustc --print cause a panic when the output of the command is piped into a process not listening for input on STDIN.

Steps to Reproduce

The following commands will crash:

  • rustc --print cfg | echo "test"
  • rustc --print target-list | echo "test"
  • rustc --print relocation-models | echo "test"
  • rustc --print code-models | echo "test"

Meta

I've seen this in the following versions:

  • rustc 1.22.0-nightly (dead08cb3 2017-09-08) running on x86_64-apple-darwin
  • rustc 1.20.0 (f3d6973f4 2017-08-27) running on x86_64-apple-darwin

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