-
Notifications
You must be signed in to change notification settings - Fork 1
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
investigate Box::new_in
issue with custom allocator
#7
Labels
bug
Something isn't working
Comments
Using this heap allocator does not fix the problem either. The issue does not exist in a different no-std environment. |
The panic occurs during the |
minimal reproduction: fn test_alloc<A: Allocator>(myalloc: A) -> A {
unsafe { core::ptr::read(&myalloc) }
} successful: _ = test_alloc(Global); panic: _ = test_alloc(&Global); |
The issue is a misaligned kernel stack. |
This will be fixed as part of #5 |
d0de740 resolves this and will be merged into main. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Creating a new box on the heap with a reference to the global allocator panics with the following error message:
_ = Box::new_in(0, &Global);
Passing the global allocator directly makes the allocation work smoothly:
_ = Box::new_in(0, Global);
The problem may be related to this or this issue. Although, they have seemingly been resolved.
Testing with this heap allocator does not solve the problem.
The text was updated successfully, but these errors were encountered: