-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Labels
area: KernelbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bugMedium impact/importance bug
Description
Steps to reproduce:
At toplevel declare:
K_MEM_POOL_DEFINE(my_pool, 64, 1024, 61, 4);
Where n_max is 61.
Then somewhere in code:
struct k_mem_block blk;
mem = k_mem_pool_alloc(&my_pool, &blk, 1024, 0);
This results in a page fault on x86, on further inspection, the dlist structures in pool->levels are being corrupted:
***** CPU Page Fault (error code 0x00000000)
Supervisor thread read address 0x20000003
If this is not a bug, we need to clearly document what the upper bounds for various parameters to K_MEM_POOL_DEFINE are, and add assertions to enforce them.
Metadata
Metadata
Assignees
Labels
area: KernelbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bugMedium impact/importance bug