From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 39E4839540F0; Wed, 23 Sep 2020 14:50:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39E4839540F0 From: "msc at linux dot ibm.com" To: glibc-bugs@sourceware.org Subject: [Bug build/26647] [-Werror=array-parameter=] due to different declarations for __sigsetjmp Date: Wed, 23 Sep 2020 14:50:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: build X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: msc at linux dot ibm.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 14:50:27 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26647 Matheus Castanho changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msc at linux dot ibm.com --- Comment #1 from Matheus Castanho --- I also noticed this when building natively on ppc64le. It doesn't seem to be target-specific. I experimented adjusting the __sigsetjmp declaration in sysdeps/nptl/pthrea= d.h to match the one in setjmp/setjmp.h, but then it led to other failure: ../csu/libc-start.c: In function =E2=80=98generic_start_main.isra=E2=80=99: ../setjmp/setjmp.h:62:25: error: =E2=80=98_setjmp=E2=80=99 accessing 656 by= tes in a region of size 528 [-Werror=3Dstringop-overflow=3D] 62 | #define setjmp(env) _setjmp (env) | ^~~~~~~~~~~~~ ../csu/libc-start.c:301:20: note: in expansion of macro =E2=80=98setjmp=E2= =80=99 301 | not_first_call =3D setjmp ((struct __jmp_buf_tag *) unwind_buf.cancel_jmp_buf); | ^~~~~~ ../setjmp/setjmp.h:62:25: note: referencing argument 1 of type =E2=80=98str= uct __jmp_buf_tag *=E2=80=99 62 | #define setjmp(env) _setjmp (env) | ^~~~~~~~~~~~~ ../csu/libc-start.c:301:20: note: in expansion of macro =E2=80=98setjmp=E2= =80=99 301 | not_first_call =3D setjmp ((struct __jmp_buf_tag *) unwind_buf.cancel_jmp_buf); | ^~~~~~ cancel_jmp_buf is defined in nptl/descr.h as: struct pthread_unwind_buf { struct { __jmp_buf jmp_buf; int mask_was_saved; } cancel_jmp_buf[1]; <...> } On the line causing the warning above, the field is cast to 'struct __jmp_buf_tag *' and passed to setjmp. But this last struct has an extra fi= eld that cancel_jmp_buf doesn't: struct __jmp_buf_tag { /* NOTE: The machine-dependent definitions of `__sigsetjmp' assume that a `jmp_buf' begins with a `__jmp_buf' and that `__mask_was_saved' follows it. Do not move these members or add others before it. */ __jmp_buf __jmpbuf; /* Calling environment. */ int __mask_was_saved; /* Saved the signal mask? */ __sigset_t __saved_mask; /* Saved signal mask. */ <------- }; Could this be an actual invalid access and not just a false-positive after = all or was this by design? --=20 You are receiving this mail because: You are on the CC list for the bug.=