public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/105029] New: sanitizer_internal_defs.h:254:72: error: size of array ‘assertion_failed__1135’ is negative
@ 2022-03-23  0:14 eyalroz1 at gmx dot com
  2022-03-23  0:16 ` [Bug sanitizer/105029] " eyalroz1 at gmx dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: eyalroz1 at gmx dot com @ 2022-03-23  0:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105029

            Bug ID: 105029
           Summary: sanitizer_internal_defs.h:254:72: error: size of array
                    ‘assertion_failed__1135’ is negative
           Product: gcc
           Version: 6.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eyalroz1 at gmx dot com
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

I'm build GCC 6.5.0 on Devuan GNU/Linux Chimaera. The configuration line was:

 ./configure --prefix=/opt/gcc-6.5.0 --enable-languages="c++,c"

and then I ran make. I get the following error:

In file included from
../../.././libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:186:0:
../../.././libsanitizer/sanitizer_common/sanitizer_internal_defs.h:254:72:
error: size of array ‘assertion_failed__1135’ is negative
     typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
                                                                        ^
../../.././libsanitizer/sanitizer_common/sanitizer_internal_defs.h:248:30:
note: in expansion of macro ‘IMPL_COMPILER_ASSERT’
 #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
                              ^~~~~~~~~~~~~~~~~~~~
../../.././libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1424:3:
note: in expansion of macro ‘COMPILER_CHECK’
   COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) == \
   ^~~~~~~~~~~~~~
../../.././libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1135:1:
note: in expansion of macro ‘CHECK_SIZE_AND_OFFSET’
 CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
 ^~~~~~~~~~~~~~~~~~~~~

CC and CXX are unset, and the default compiler is gcc (Debian 10.2.1-6) 10.2.1
20210110 ; I can provide more information about my system as necessary.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug sanitizer/105029] sanitizer_internal_defs.h:254:72: error: size of array ‘assertion_failed__1135’ is negative
  2022-03-23  0:14 [Bug sanitizer/105029] New: sanitizer_internal_defs.h:254:72: error: size of array ‘assertion_failed__1135’ is negative eyalroz1 at gmx dot com
@ 2022-03-23  0:16 ` eyalroz1 at gmx dot com
  2022-03-23  0:36 ` pinskia at gcc dot gnu.org
  2022-03-23 20:46 ` eyalroz1 at gmx dot com
  2 siblings, 0 replies; 4+ messages in thread
From: eyalroz1 at gmx dot com @ 2022-03-23  0:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105029

Eyal Rozenberg <eyalroz1 at gmx dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
               Host|                            |x86_64-pc-linux-gnu
             Target|                            |x86_64-pc-linux-gnu

--- Comment #1 from Eyal Rozenberg <eyalroz1 at gmx dot com> ---
I'm running on an x86_64 machine, with an Intel i5-7600K CPU.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug sanitizer/105029] sanitizer_internal_defs.h:254:72: error: size of array ‘assertion_failed__1135’ is negative
  2022-03-23  0:14 [Bug sanitizer/105029] New: sanitizer_internal_defs.h:254:72: error: size of array ‘assertion_failed__1135’ is negative eyalroz1 at gmx dot com
  2022-03-23  0:16 ` [Bug sanitizer/105029] " eyalroz1 at gmx dot com
@ 2022-03-23  0:36 ` pinskia at gcc dot gnu.org
  2022-03-23 20:46 ` eyalroz1 at gmx dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-03-23  0:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105029

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE
           Keywords|                            |build

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This was fixed in GCC 9.3.0 (and the GCC 10+). There is not much can be done
for older GCC as they are not maintained any more. You could backport the fix
if you want.

The commit was r9-8063-g75003cdd23c310 (for the backport to GCC 9) and
r10-4986-g4abc46b51af575 for GCC 10+ releases.

*** This bug has been marked as a duplicate of bug 95934 ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug sanitizer/105029] sanitizer_internal_defs.h:254:72: error: size of array ‘assertion_failed__1135’ is negative
  2022-03-23  0:14 [Bug sanitizer/105029] New: sanitizer_internal_defs.h:254:72: error: size of array ‘assertion_failed__1135’ is negative eyalroz1 at gmx dot com
  2022-03-23  0:16 ` [Bug sanitizer/105029] " eyalroz1 at gmx dot com
  2022-03-23  0:36 ` pinskia at gcc dot gnu.org
@ 2022-03-23 20:46 ` eyalroz1 at gmx dot com
  2 siblings, 0 replies; 4+ messages in thread
From: eyalroz1 at gmx dot com @ 2022-03-23 20:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105029

--- Comment #3 from Eyal Rozenberg <eyalroz1 at gmx dot com> ---
(In reply to Andrew Pinski from comment #2)
> You could backport the fix if you want.

I'd like to trouble you for a little more guidance, so that I can apply the fix
to 6.5.0.

Now, I understand the fix does two things:

1. Change the conditions under which a size-and-type check is performed
2. Change the structure of __sanitizer_ipc_perm for various platforms.

However, this is difficult to back-port when I don't understand what the actual
problem was.

The layout, and types, of the __sanitizer_ipc_perm structure is different in
6.5.0 and in 9.3.0, so that it's not clear what fields to change, into what,
and for what platforms/combination of flags. The CHECK_SIZE_AND_TYPE - I can
use the same condition as in the patched version, but - are they the
appropriate ones for 6.5.0?

Help out a poor developer who's trying to maintain compatibility of his library
with older systems/compilers.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-23 20:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23  0:14 [Bug sanitizer/105029] New: sanitizer_internal_defs.h:254:72: error: size of array ‘assertion_failed__1135’ is negative eyalroz1 at gmx dot com
2022-03-23  0:16 ` [Bug sanitizer/105029] " eyalroz1 at gmx dot com
2022-03-23  0:36 ` pinskia at gcc dot gnu.org
2022-03-23 20:46 ` eyalroz1 at gmx dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).