Add gcc_assert about stack alignment (PR sanitizer/82517).
2018-01-09 Martin Liska <mliska@suse.cz> PR sanitizer/82517 * asan.c (shadow_mem_size): Add gcc_assert. From-SVN: r256378
This commit is contained in:
parent
684684c628
commit
aa5bfa8d5d
@ -1,3 +1,8 @@
|
||||
2018-01-09 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR sanitizer/82517
|
||||
* asan.c (shadow_mem_size): Add gcc_assert.
|
||||
|
||||
2018-01-09 Georg-Johann Lay <avr@gjlay.de>
|
||||
|
||||
Don't save registers in main().
|
||||
|
@ -1228,6 +1228,11 @@ asan_function_start (void)
|
||||
static unsigned HOST_WIDE_INT
|
||||
shadow_mem_size (unsigned HOST_WIDE_INT size)
|
||||
{
|
||||
/* It must be possible to align stack variables to granularity
|
||||
of shadow memory. */
|
||||
gcc_assert (BITS_PER_UNIT
|
||||
* ASAN_SHADOW_GRANULARITY <= MAX_SUPPORTED_STACK_ALIGNMENT);
|
||||
|
||||
return ROUND_UP (size, ASAN_SHADOW_GRANULARITY) / ASAN_SHADOW_GRANULARITY;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user