Skip to content

This naked function SIGSEGVs #32490

Closed
@nagisa

Description

@nagisa
#![feature(naked_functions)]

#[naked]
fn naked(x: u32) -> u32 {
    x + 1
}

fn main(){
    naked(42);
}

SIGSEGVs on my system, but it only happens in builds without -O or -g flags, making it hard to debug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-nakedArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSC-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.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.T-langRelevant to the language team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions