2018-01-09 Martin Liska <mliska@suse.cz>
PR sanitizer/82517
* asan.c (shadow_mem_size): Add gcc_assert.
From-SVN: r256378
+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().
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;
}