-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-nakedArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSC-bugCategory: This is a bug.Category: This is a bug.I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.T-langRelevant to the language teamRelevant to the language teamrequires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Description
RFC states that naked functions must either not contain any “safe” blocks or be unsafe themselves. Currently, code like
#![feature(asm, naked_functions)]
#[naked]
extern "win64" fn naked(x: u32) -> u32 {
x + 1
}
is accepted.
Metadata
Metadata
Assignees
Labels
A-nakedArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSC-bugCategory: This is a bug.Category: This is a bug.I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.T-langRelevant to the language teamRelevant to the language teamrequires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
nagisa commentedon Mar 25, 2016
cc #32408
steveklabnik commentedon Dec 25, 2019
Triage: still reproduces today
npmccallum commentedon Aug 4, 2021
@nagisa @steveklabnik I propose we reject this bug in light of the Constrained Naked RFC. There is nothing which prevents a naked function from being safe.
Rollup merge of rust-lang#93153 - tmiasko:reject-unsupported-naked-fu…
Rollup merge of rust-lang#93153 - tmiasko:reject-unsupported-naked-fu…
Rollup merge of rust-lang#93153 - tmiasko:reject-unsupported-naked-fu…