With CMAKE_BUILD_TYPE=Release on latest Ubuntu (gcc version 12.2.0 (Ubuntu 12.2.0-3ubuntu1)) I'm seeing the following:
brlcad/src/libbu/bitv.c:149:16: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
149 | *out++ |= *in++;
| ^
brlcad/include/bu/bitv.h:111:12: note: at offset [22, 2305843009213693950] into destination object ‘bits’ of size 2
111 | bitv_t bits[2]; /**< variable size array */
| ^
brlcad/include/bu/bitv.h:111:12: note: at offset [6, 14] into destination object ‘bits’ of size 2
brlcad/include/bu/bitv.h:111:12: note: at offset [22, 2305843009213693950] into destination object ‘bits’ of size 2
Anybody else seeing the following?
src/libbu/progname.c:138:73: error: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Werror=format-truncation=]
138 | snprintf(buffer+strlen(buffer), sizeof(buffer)-strlen(buffer), "%c%s", BU_DIR_SEPARATOR, argv0);
| ^
In file included from /usr/include/stdio.h:906,
from include/bio.h:41,
from src/libbu/progname.c:41:
In function ‘snprintf’,
inlined from ‘bu_argv0_full_path’ at src/libbu/progname.c:138:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output between 2 and 4097 bytes into a destination of size 4096
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
OK, main branch doesn't show it. Must be something I'm doing in a branch.
Ah - one of the bits of code I was shoehorning in on the branch requires C++17 standard - that might be it
No... combination of the O2 flag and something else... hmm...
Last updated: Jan 09 2025 at 00:46 UTC