Skip to content

miri does not detect reading undefined bytes if simple unions are involved #51330

Closed

Description

@oli-obk

http://play.rust-lang.org/?gist=99912c4c87d4d676817c8a7263289c9b&version=undefined&mode=undefined

shows an example where miri returns zeroes instead of erroring because of undefined bytes being read.

Activity

  1. added
    I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
    C-bugCategory: This is a bug.
    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)
    and removed
    I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
    on Jun 3, 2018
  2. oli-obk commented on Jun 3, 2018

    @oli-obk
    ContributorAuthor

    not really unsound, because you already were doing UB via unsafe code. Just miri should be better at detecting it

  3. added 3 commits that reference this issue on Jul 19, 2018
    4abdab6
  4. added a commit that references this issue on Jul 27, 2018
    f869652
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-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions