Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM lint error with glue_drop #6779

Closed
Aatch opened this issue May 28, 2013 · 3 comments
Closed

LLVM lint error with glue_drop #6779

Aatch opened this issue May 28, 2013 · 3 comments

Comments

@Aatch
Copy link
Contributor

Aatch commented May 28, 2013

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)
}
@Aatch
Copy link
Contributor Author

Aatch commented May 30, 2013

part of #6819

@Aatch
Copy link
Contributor Author

Aatch commented Jun 29, 2013

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.

@thestinger
Copy link
Contributor

This specific issue is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants