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

Upgrade linked list allocator #363

Merged
merged 3 commits into from
Jul 8, 2022
Merged

Conversation

vinc
Copy link
Owner

@vinc vinc commented Jun 29, 2022

The constructor of the allocator in version 0.10.0 takes a pointer instead of the address of HEAP_START

See https://github.com/rust-osdev/linked-list-allocator/blob/main/Changelog.md#0100--2022-06-27
And rust-osdev/linked-list-allocator#62

But this breaks the boot of MOROS during the first initialization of a string from what I can see in gdb:

...
#31 0x0000000000253c7f in moros::panic (info=0x10000201368) at src/main.rs:44
#32 0x00000000006252f3 in core::panicking::panic_fmt (fmt=...) at src/panicking.rs:142
#33 0x000000000062516a in core::panicking::panic (expr=...) at src/panicking.rs:48
#34 0x00000000004f0b7a in linked_list_allocator::hole::Cursor::try_insert_after (self=0x100002015e8, node=...) at src/hole.rs:439
#35 0x00000000004f0fea in linked_list_allocator::hole::deallocate (list=0x67aba0 <moros::sys::allocator::ALLOCATOR+32>, addr=0x444444440328, size=192)
    at src/hole.rs:536
#36 0x00000000004f03fd in linked_list_allocator::hole::HoleList::deallocate (self=0x67aba0 <moros::sys::allocator::ALLOCATOR+32>, ptr=..., layout=...)
    at src/hole.rs:353
#37 0x00000000004eec66 in linked_list_allocator::Heap::deallocate (self=0x67ab88 <moros::sys::allocator::ALLOCATOR+8>, ptr=..., layout=...)
    at src/lib.rs:182
#38 0x00000000004eee38 in linked_list_allocator::{impl#4}::dealloc (self=0x67ab80 <moros::sys::allocator::ALLOCATOR>, ptr=0x444444440328, layout=...)
    at src/lib.rs:302
#39 0x000000000034a04c in moros::sys::allocator::_::__rg_dealloc (arg0=0x444444440328, arg1=192, arg2=8) at src/sys/allocator.rs:18
#40 0x00000000005e1f2a in alloc::alloc::dealloc (ptr=0x444444440328, layout=...)
...
#49 0x0000000000259a65 in alloc::string::{impl#40}::to_string<time::format::deferred_format::DeferredFormat> (self=0x10000201b10)
    at /home/v/.rustup/toolchains/nightly-2022-06-21-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs:2489
#50 0x00000000003cb865 in time::offset_date_time::OffsetDateTime::format<&str> (self=..., format=...)
    at /home/v/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/time-0.2.27/src/offset_date_time.rs:862
#51 0x000000000029406c in moros::sys::clock::init () at src/sys/clock.rs:108
#52 0x00000000003f8bba in moros::init (boot_info=0x10000000000) at src/lib.rs:39
#53 0x0000000000253514 in moros::main (boot_info=0x10000000000) at src/main.rs:13
#54 0x0000000000253d0a in moros::__impl_start (boot_info=0x10000000000)

dependabot bot and others added 3 commits June 28, 2022 04:20
Bumps [linked_list_allocator](https://github.com/phil-opp/linked-list-allocator) from 0.9.1 to 0.10.0.
- [Release notes](https://github.com/phil-opp/linked-list-allocator/releases)
- [Changelog](https://github.com/rust-osdev/linked-list-allocator/blob/main/Changelog.md)
- [Commits](rust-osdev/linked-list-allocator@v0.9.1...v0.10.0)

---
updated-dependencies:
- dependency-name: linked_list_allocator
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@vinc
Copy link
Owner Author

vinc commented Jul 8, 2022

This PR fixed the issue: rust-osdev/linked-list-allocator#64

@vinc vinc marked this pull request as ready for review July 8, 2022 06:41
@vinc vinc merged commit 2426d2f into trunk Jul 8, 2022
@vinc vinc deleted the chore/upgrade-linked-list-allocator branch July 8, 2022 06:43
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

Successfully merging this pull request may close these issues.

1 participant