Skip to content

Commit 2ee7f5d

Browse files
Flavio Ceolinhakehuang
authored andcommitted
sys: usermode: Document 0 size buffer memory check
Documenting that 0 size buffer has undefined behavior. See: zephyrproject-rtos#23239 Signed-off-by: Flavio Ceolin <[email protected]>
1 parent 85f93bd commit 2ee7f5d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/sys/arch_interface.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,8 @@ void arch_mem_domain_destroy(struct k_mem_domain *domain);
578578
* if the supplied memory buffer spans multiple enabled memory management
579579
* regions (even if all such regions permit user access).
580580
*
581+
* @warning 0 size buffer has undefined behavior.
582+
*
581583
* @param addr start address of the buffer
582584
* @param size the size of the buffer
583585
* @param write If nonzero, additionally check if the area is writable.

0 commit comments

Comments
 (0)