]> Savannah Git Hosting - gnulib.git/commit
malloca: Take advantage of CHERI bounds-checking.
authorBruno Haible <bruno@clisp.org>
Sat, 11 Nov 2023 19:04:02 +0000 (20:04 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 11 Nov 2023 19:04:02 +0000 (20:04 +0100)
commit5c8fc31ab5db3372739a7ae9bf579cef946408ad
tree666fd2384a077f03bedea3dfcef2b743a509eb13
parent2d9d3ddae5dde383bac8f133f0551ce511f05f2d
malloca: Take advantage of CHERI bounds-checking.

* lib/malloca.h: Include <cheri.h>.
(malloca) [CHERI]: In the stack-allocation case, return a pointer with
a tight lower bound and a tight upper bound.
* lib/malloca.c: Include <cheri.h>.
(small_t) [CHERI]: Define as uintptr_t.
(mmalloca) [CHERI]: Return a pointer with a tight upper bound.
(freea) [CHERI]: Update.
ChangeLog
lib/malloca.c
lib/malloca.h