Stream: brlcad

Topic: gcc 12.2.0 issue


view this post on Zulip starseeker (Dec 06 2022 at 20:02):

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

view this post on Zulip starseeker (Jan 20 2023 at 21:12):

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 ());
      |                                    ~~~~~~~~~~~~~~~~~

view this post on Zulip starseeker (Jan 24 2023 at 21:47):

OK, main branch doesn't show it. Must be something I'm doing in a branch.

view this post on Zulip starseeker (Jan 24 2023 at 22:00):

Ah - one of the bits of code I was shoehorning in on the branch requires C++17 standard - that might be it

view this post on Zulip starseeker (Jan 25 2023 at 01:06):

No... combination of the O2 flag and something else... hmm...


Last updated: Oct 09 2024 at 00:44 UTC