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

MutBumpVec crashes when bump pointer is not aligned #16

Closed
bluurryy opened this issue May 1, 2024 · 1 comment
Closed

MutBumpVec crashes when bump pointer is not aligned #16

bluurryy opened this issue May 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@bluurryy
Copy link
Owner

bluurryy commented May 1, 2024

This will crash:

#[test]
fn unaligned_mut_bump_vec() {
    let mut bump: Bump = Bump::new();

    bump.alloc(8u8);

    let mut vec = MutBumpVec::new_in(&mut bump);
    vec.push(32u32);

    let slice = vec.into_slice();
    dbg!(slice);
}
@bluurryy bluurryy added the bug Something isn't working label May 1, 2024
@bluurryy
Copy link
Owner Author

bluurryy commented May 1, 2024

This is because of a wrong debug assertion.

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

No branches or pull requests

1 participant