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

Ownership analysis panics on (valist/ap.arg) generics #156

Open
TheDan64 opened this issue Sep 4, 2019 · 1 comment
Open

Ownership analysis panics on (valist/ap.arg) generics #156

TheDan64 opened this issue Sep 4, 2019 · 1 comment
Labels
bug Something isn't working refactorer This issue relates to the refactoring tool

Comments

@TheDan64
Copy link
Contributor

TheDan64 commented Sep 4, 2019

#[no_mangle]
unsafe extern "C" fn valist(c: *const u8, mut ap: ...) {
    let x = ap.arg::<u32>();
}

will cause a panic on the variable index (off by one) here:

TyKind::Param(ref tp) => substs[tp.index as usize],

@TheDan64 TheDan64 added bug Something isn't working refactorer This issue relates to the refactoring tool labels Sep 4, 2019
@TheDan64
Copy link
Contributor Author

This is currently worked around in my local analysis branch, by calling get rather than indexing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working refactorer This issue relates to the refactoring tool
Projects
None yet
Development

No branches or pull requests

1 participant