1 Reply Latest reply on Nov 26, 2018 8:06 PM by David Pagan-Oracle

    Studio 12.6/amd64 C compiler crash

    RaiderOfTheLostSPARC

      Hi,

       

      is this a known issue?

       

      $ cat crash.c

      #include <sys/types.h>

       

      struct grid_cell_entry {

          u_char          flags;

          union {

              u_int       offset;

              struct {

                  u_char  attr;

                  u_char  fg;

                  u_char  bg;

                  u_char  data;

              } data;

          };

      } __packed;

       

      struct paste_buffer {

              char            *data;

              size_t           size;

      };

       

      /* Get paste buffer data. */

      const char *

      paste_buffer_data(struct paste_buffer *pb, size_t *size)

      {

              if (size != NULL)

                      *size = pb->size;

              return (pb->data);

      }

       

      int

      main(void)

      {

              return 0;

      }

       

      $ cc -Wall crash.c

      Assertion failed: offset >= 0 && offset < record->size, file ../src/ctypes.c, line 456

      cc: Warning: Static error checker encountered an unexpected error.