Martin Sebor wrote:
> Attached is an updated patch that adds checks for excessive sizes
> and bounds (those in excess of SIZE_MAX / 2), and also enables
> the same checking for strcat and strncat).  This version also
> fixes an issue with the interpretation of anti-ranges in the
> first patch.  The improvements exposed two bugs in the regression
> tests.

If I apply this patch to my local trunk - and try to bootstrap GCC,
bootstrapping fails (on x86-64_gnu-linux) as following. I have not
tried to figure out whether the warning (-Werror) makes sense or not.

../../gcc/emit-rtl.c: In function ‘rtx_note* make_note_raw(insn_note)’:
../../gcc/emit-rtl.c:3933:59: error: void* memset(void*, int, size_t) writing 8 
bytes into a region of size 0 overflows the destination 
[-Werror=stringop-overflow]
   memset (&NOTE_DATA (note), 0, sizeof (NOTE_DATA (note)));


where NOTE_DATA is defined in rtl.h as

/* Opaque data.  */
#define NOTE_DATA(INSN)         RTL_CHECKC1 (INSN, 3, NOTE)


Cheers,

Tobias

Reply via email to