Skip to content

Unsized function argument causes LLVM segfault #41229

Closed
@arielb1

Description

@arielb1

Meta

rustc 1.18.0-nightly (3b5754e5c 2017-04-10)

STR

pub fn example(ref s: str) {}

fn main() {}

Result

rustc 1.18.0-nightly (3b5754e5c 2017-04-10)
warning: unused variable: `s`
 --> <anon>:1:16
  |
1 | pub fn example(ref s: str) {}
  |                ^^^^^
  |
  = note: #[warn(unused_variables)] on by default

Segmentation fault (core dumped)

This is not an LLVM assertion, but rather a NULL pointer passed to val_ty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationC-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions