mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
support: Add support_next_to_fault_before support function
Refactor the support_next_to_fault and add the support_next_to_fault_before method returns a buffer with a protected page before it, to be able to test buffer underflow accesses. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@redhat.com>
This commit is contained in:
@@ -41,6 +41,11 @@ struct support_next_to_fault
|
||||
fault). */
|
||||
struct support_next_to_fault support_next_to_fault_allocate (size_t size);
|
||||
|
||||
/* Allocate a buffer of SIZE bytes just *after* a page which is mapped
|
||||
with PROT_NONE (so that under-running the buffer will cause a
|
||||
fault). */
|
||||
struct support_next_to_fault support_next_to_fault_allocate_before (size_t size);
|
||||
|
||||
/* Deallocate the memory region allocated by
|
||||
next_to_fault_allocate. */
|
||||
void support_next_to_fault_free (struct support_next_to_fault *);
|
||||
|
Reference in New Issue
Block a user