Skip to content

LLVM lint error with glue_drop #6779

Closed
Closed

Description

@Aatch

From implementing #6778, LLVM's linter spits out this a lot:

Undefined behavior: Call argument type mismatches callee parameter type
  %25 = call {} bitcast ({} ({}*, {}*, %tydesc**, { i64, %tydesc*, i8*, i8*, i32 } addrspace(1)**)* @_ZN9_ubox_u3217_b6378abf1e661b9814glue_drop_2923E to {} ({}*, {}*, %tydesc**, { i64, %tydesc*, i8*, i8*, i64 } addrspace(1)**)*)({}* null, {}* null, %tydesc** null, { i64, %tydesc*, i8*, i8*, i64 } addrspace(1)** %3)

This comes from this code:

pub fn test() -> ~uint {
    let a = ~1;
    let b = ~2;
    ~(*a + *b)
}

Activity

  1. Aatch commented on May 30, 2013

    @Aatch
    ContributorAuthor

    part of #6819

  2. Aatch commented on Jun 29, 2013

    @Aatch
    ContributorAuthor

    This has been somewhat fixed by a recent change, the above example doesn't complain about the drop glue. It does, however, complain about the cast::transmute calls.

  3. thestinger commented on Jul 19, 2013

    @thestinger
    Contributor

    This specific issue is fixed now.

  4. added a commit that references this issue on Aug 21, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions