Skip to content

rust-intrinsic ABI functions should be unsafe #6370

Closed

Description

@brson

They seem to be safe by default now when other foreign ABI's are unsafe.

Reasonable people disagree.

Activity

  1. alexcrichton commented on May 9, 2013

    @alexcrichton
    Member

    It seems like some of them like sinf32/logf32/etc probably shouldn't be unsafe. Other ones like forget/init/atomic_* probably should be unsafe.

    The safe ones could be re-exported via a non-unsafe function though, because default unsafe is probably more reasonable.

  2. thestinger commented on May 9, 2013

    @thestinger
    Contributor

    I would prefer if they were unsafe by default and you could explicitly tag them with #[safe].

  3. bblum commented on Jul 3, 2013

    @bblum
    Contributor

    nominating backwards-compatible

  4. bblum commented on Jul 3, 2013

    @bblum
    Contributor

    This seems like it should be a pretty easy change to make, so giving this E-easy. The relevant function to change is check_intrinsic_type in middle/typeck/check/mod.rs.

  5. bblum commented on Aug 12, 2013

    @bblum
    Contributor

    what, i just had this bug for triage a month ago

  6. catamorphism commented on Aug 29, 2013

    @catamorphism
    Contributor

    @brson says this is an implementation detail. De-milestoning

  7. alexcrichton commented on Aug 30, 2013

    @alexcrichton
    Member

    This appears to have been done now, all intrinsics are unsafe.

    We can explicitly expose safe versions if we need to.

  8. added a commit that references this issue on Dec 20, 2020
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

    A-type-systemArea: Type systemE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions