Skip to content

Fix [[A; N]; M] cannot be used with allo isolate#66

Closed
fzyzcjy wants to merge 2 commits intoshekohex:masterfrom
fzyzcjy:patch-3
Closed

Fix [[A; N]; M] cannot be used with allo isolate#66
fzyzcjy wants to merge 2 commits intoshekohex:masterfrom
fzyzcjy:patch-3

Conversation

@fzyzcjy
Copy link
Contributor

@fzyzcjy fzyzcjy commented May 16, 2025

@fzyzcjy fzyzcjy changed the title Fix [[A; 3]; 3] cannot be used with allo isolate Fix [[A; N]; M] cannot be used with allo isolate May 16, 2025
Copy link
Owner

@shekohex shekohex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, do you mind fixing the CI?

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented May 16, 2025

Well I have no time recently :(

@shekohex
Copy link
Owner

Well I have no time recently :(

There is also a memory leak that the CI has detected after this change.

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented May 16, 2025

Hmm, wondering whether it is a real leak or not. Looks like it is caused by random_seed. Maybe we should suppress it?

==16893== HEAP SUMMARY:
==16893==     in use at exit: 34,942,424 bytes in 46,936 blocks
==16893==   total heap usage: 113,331 allocs, 66,395 frees, 62,774,482 bytes allocated
==16893== 
==16893== 48 bytes in 1 blocks are possibly lost in loss record 3 of 62
==16893==    at 0x484680F: malloc (vg_replace_malloc.c:446)
==16893==    by 0x2AFC57: alloc (alloc.rs:93)
==16893==    by 0x2AFC57: alloc_impl (alloc.rs:188)
==16893==    by 0x2AFC57: allocate (alloc.rs:249)
==16893==    by 0x2AFC57: {closure#0}<std::thread::Inner> (sync.rs:505)
==16893==    by 0x2AFC57: allocate_for_layout<core::mem::maybe_uninit::MaybeUninit<std::thread::Inner>, alloc::sync::{impl#14}::new_uninit::{closure_env#0}<std::thread::Inner>, fn(*mut u8) -> *mut alloc::sync::ArcInner<core::mem::maybe_uninit::MaybeUninit<std::thread::Inner>>> (sync.rs:1985)
==16893==    by 0x2AFC57: new_uninit<std::thread::Inner> (sync.rs:503)
==16893==    by 0x2AFC57: std::thread::Thread::new (mod.rs:1429)
==16893==    by 0x[12](https://github.com/shekohex/allo-isolate/actions/runs/15070928728/job/42366794103?pr=66#step:6:13)E419: std::thread::current::init_current (current.rs:227)
==16893==    by 0x177E31: fastrand::global_rng::random_seed (global_rng.rs:201)
==16893==    by 0x177EF6: fastrand::global_rng::RNG::__init (global_rng.rs:31)
==16893==    by 0x176C85: core::ops::function::FnOnce::call_once (function.rs:250)
==16893==    by 0x176400: unwrap_or_else<core::cell::Cell<fastrand::Rng>, fn() -> core::cell::Cell<fastrand::Rng>> (option.rs:1023)
==16893==    by 0x176400: std::sys::thread_local::native::lazy::Storage<T,D>::initialize (lazy.rs:64)
==16893==    by 0x176624: std::sys::thread_local::native::lazy::Storage<T,D>::get_or_init (lazy.rs:56)
==16893==    by 0x177F51: fastrand::global_rng::RNG::{{constant}}::{{closure}} (mod.rs:101)
==16893==    by 0x[13](https://github.com/shekohex/allo-isolate/actions/runs/15070928728/job/42366794103?pr=66#step:6:14)71EB: core::ops::function::FnOnce::call_once (function.rs:250)
==16893==    by 0x135B6D: std::thread::local::LocalKey<T>::try_with (local.rs:310)
==16893==    by 0x135727: std::thread::local::LocalKey<T>::with (local.rs:275)

@shekohex
Copy link
Owner

Hmm, wondering whether it is a real leak or not. Looks like it is caused by random_seed. Maybe we should suppress it?

Yes!

@shekohex shekohex added good first issue Good for newcomers help wanted Extra attention is needed labels Jun 30, 2025
@shekohex
Copy link
Owner

any followup on this PR @fzyzcjy so we can complete it?

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Jul 1, 2025

Since there seems to be no real errors I may not have time to further update it :(

@shekohex
Copy link
Owner

shekohex commented Sep 1, 2025

Since there seems to be no real errors I may not have time to further update it :(

See #70

@shekohex
Copy link
Owner

shekohex commented Sep 2, 2025

Solved in #70, thanks @fzyzcjy all code changes is from your original PR.

@shekohex shekohex closed this Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The method into_into_dart exists for array [[ElementKind; 3]; 3] but its trait bounds were not satisfied

2 participants