Skip to content

Disable stringop-overread with gcc-11+ Address Sanitizer

Ondřej Surý requested to merge 3510-disable-stringop-overread into main

When Address Sanitizer is enabled in gcc-11+, number of false positives might appear like this:

netmgr/udp.c: In function 'isc__nm_udp_send':
netmgr/udp.c:729:13: warning: 'uv_udp_send' reading 16 bytes from a region of size 8 [-Wstringop-overread]
  729 |         r = uv_udp_send(&uvreq->uv_req.udp_send, &sock->uv_handle.udp,
  |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  730 |                         &uvreq->uvbuf, 1, sa, udp_send_cb);
  |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
netmgr/udp.c:729:13: note: referencing argument 3 of type 'const uv_buf_t[0]'
In file included from ./include/isc/uv.h:17,
	     from ./include/isc/barrier.h:31,
	     from netmgr/udp.c:17:
/usr/include/uv.h:711:15: note: in a call to function 'uv_udp_send'
  711 | UV_EXTERN int uv_udp_send(uv_udp_send_t* req,
  |               ^~~~~~~~~~~

Disable the warning globally in the autoconf, instead of just locally in a single CI job, as it might affect people outside our GitLab CI.

Closes #3510 (closed)

Merge request reports