* [Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap
2023-06-01 10:05 [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap ro at gcc dot gnu.org
@ 2023-06-01 10:05 ` ro at gcc dot gnu.org
2023-06-01 16:50 ` david.faust at oracle dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ro at gcc dot gnu.org @ 2023-06-01 10:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap
2023-06-01 10:05 [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap ro at gcc dot gnu.org
2023-06-01 10:05 ` [Bug debug/110073] " ro at gcc dot gnu.org
@ 2023-06-01 16:50 ` david.faust at oracle dot com
2023-06-02 8:38 ` iains at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: david.faust at oracle dot com @ 2023-06-01 16:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073
--- Comment #1 from David Faust <david.faust at oracle dot com> ---
Created attachment 55234
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55234&action=edit
alternate proposed patch
Thank you for catching this, and for the fix!
With the proposed patch on linux x86_64 I see the following:
../../../gcc/gcc/btfout.cc: In function ‘void
btf_asm_func_type(ctf_container_ref, ctf_dtdef_ref, size_t)’:
../../../gcc/gcc/btfout.cc:952:31: warning: format ‘%u’ expects argument of
type ‘unsigned int’, but argument 4 has type ‘size_t’ {aka ‘long unsigned int’}
[-Wformat=]
952 | "TYPE %u BTF_KIND_FUNC '%s'",
| ~^
| |
| unsigned int
| %lu
953 | num_types_added + num_vars_added + 1 + i,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| size_t {aka
long unsigned int}
I believe %zu instead of %u should work.
Alternatively, a small refactor to the offending code makes it behave in line
with the other functions (to properly use a ctf_id_t, and then PRIu64 as in
your patch). But I haven't verified this on solaris/x86 yet.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap
2023-06-01 10:05 [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap ro at gcc dot gnu.org
2023-06-01 10:05 ` [Bug debug/110073] " ro at gcc dot gnu.org
2023-06-01 16:50 ` david.faust at oracle dot com
@ 2023-06-02 8:38 ` iains at gcc dot gnu.org
2023-06-02 12:58 ` iains at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: iains at gcc dot gnu.org @ 2023-06-02 8:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-06-02
Ever confirmed|0 |1
CC| |iains at gcc dot gnu.org
Target|i386-pc-solaris2.11 |i386-pc-solaris2.11,
| |x86_64-apple-darwin*
Status|UNCONFIRMED |NEW
--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> ---
there seems to be a second fail on x86_64 darwin on line 970.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap
2023-06-01 10:05 [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap ro at gcc dot gnu.org
` (2 preceding siblings ...)
2023-06-02 8:38 ` iains at gcc dot gnu.org
@ 2023-06-02 12:58 ` iains at gcc dot gnu.org
2023-06-02 15:49 ` david.faust at oracle dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: iains at gcc dot gnu.org @ 2023-06-02 12:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073
--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #2)
> there seems to be a second fail on x86_64 darwin on line 970.
I tried the alternate patch on a number of x86_64, i686 and power Darwin
systems and bootstrap is restored.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap
2023-06-01 10:05 [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap ro at gcc dot gnu.org
` (3 preceding siblings ...)
2023-06-02 12:58 ` iains at gcc dot gnu.org
@ 2023-06-02 15:49 ` david.faust at oracle dot com
2023-06-02 16:24 ` iains at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: david.faust at oracle dot com @ 2023-06-02 15:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073
--- Comment #4 from David Faust <david.faust at oracle dot com> ---
(In reply to Iain Sandoe from comment #3)
> (In reply to Iain Sandoe from comment #2)
> > there seems to be a second fail on x86_64 darwin on line 970.
>
> I tried the alternate patch on a number of x86_64, i686 and power Darwin
> systems and bootstrap is restored.
Thanks for confirming. I'll go ahead and send it to the list.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap
2023-06-01 10:05 [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap ro at gcc dot gnu.org
` (4 preceding siblings ...)
2023-06-02 15:49 ` david.faust at oracle dot com
@ 2023-06-02 16:24 ` iains at gcc dot gnu.org
2023-06-02 16:32 ` david.faust at oracle dot com
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: iains at gcc dot gnu.org @ 2023-06-02 16:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073
--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to David Faust from comment #4)
> (In reply to Iain Sandoe from comment #3)
> > (In reply to Iain Sandoe from comment #2)
> > > there seems to be a second fail on x86_64 darwin on line 970.
> >
> > I tried the alternate patch on a number of x86_64, i686 and power Darwin
> > systems and bootstrap is restored.
>
> Thanks for confirming. I'll go ahead and send it to the list.
I think with bootstrap fixes, you are allowed a bit more independence - i.e.
can go ahead and apply - but now needs resolution with Alex's patch,
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap
2023-06-01 10:05 [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap ro at gcc dot gnu.org
` (5 preceding siblings ...)
2023-06-02 16:24 ` iains at gcc dot gnu.org
@ 2023-06-02 16:32 ` david.faust at oracle dot com
2023-06-02 16:33 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: david.faust at oracle dot com @ 2023-06-02 16:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073
--- Comment #6 from David Faust <david.faust at oracle dot com> ---
(In reply to Iain Sandoe from comment #5)
> (In reply to David Faust from comment #4)
> > (In reply to Iain Sandoe from comment #3)
> > > (In reply to Iain Sandoe from comment #2)
> > > > there seems to be a second fail on x86_64 darwin on line 970.
> > >
> > > I tried the alternate patch on a number of x86_64, i686 and power Darwin
> > > systems and bootstrap is restored.
> >
> > Thanks for confirming. I'll go ahead and send it to the list.
>
> I think with bootstrap fixes, you are allowed a bit more independence - i.e.
> can go ahead and apply - but now needs resolution with Alex's patch,
OK, thanks. And yes I just ran into the conflict. Rebasing now.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap
2023-06-01 10:05 [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap ro at gcc dot gnu.org
` (6 preceding siblings ...)
2023-06-02 16:32 ` david.faust at oracle dot com
@ 2023-06-02 16:33 ` cvs-commit at gcc dot gnu.org
2023-06-02 16:35 ` acoplan at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-02 16:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Faust <dfaust@gcc.gnu.org>:
https://gcc.gnu.org/g:934da923a7295ae97e37425e269195c7d8770ef0
commit r14-1504-g934da923a7295ae97e37425e269195c7d8770ef0
Author: David Faust <david.faust@oracle.com>
Date: Fri Jun 2 09:28:32 2023 -0700
btf: fix bootstrap -Wformat errors [PR110073]
Commit 7aae58b04b9 "btf: improve -dA comments for testsuite" broke
bootstrap on a number of architectures because it introduced some
new -Wformat errors.
Fix those errors by properly using PRIu64 and a small refactor to
the offending code.
Based on the suggested patch from Rainer Orth.
PR debug/110073
gcc/ChangeLog:
* btfout.cc (btf_absolute_func_id): New function.
(btf_asm_func_type): Call it here. Change index parameter from
size_t to ctf_id_t. Use PRIu64 formatter.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap
2023-06-01 10:05 [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap ro at gcc dot gnu.org
` (7 preceding siblings ...)
2023-06-02 16:33 ` cvs-commit at gcc dot gnu.org
@ 2023-06-02 16:35 ` acoplan at gcc dot gnu.org
2023-06-02 16:41 ` david.faust at oracle dot com
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: acoplan at gcc dot gnu.org @ 2023-06-02 16:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |acoplan at gcc dot gnu.org
--- Comment #8 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Thanks for the follow-up fix and apologies for the mid-air collision, I didn't
see the %zu problem on the target I was testing.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap
2023-06-01 10:05 [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap ro at gcc dot gnu.org
` (8 preceding siblings ...)
2023-06-02 16:35 ` acoplan at gcc dot gnu.org
@ 2023-06-02 16:41 ` david.faust at oracle dot com
2023-06-29 8:00 ` iains at gcc dot gnu.org
2023-06-29 8:47 ` ro at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: david.faust at oracle dot com @ 2023-06-02 16:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073
--- Comment #9 from David Faust <david.faust at oracle dot com> ---
(In reply to Alex Coplan from comment #8)
> Thanks for the follow-up fix and apologies for the mid-air collision, I
> didn't see the %zu problem on the target I was testing.
No problem, thanks for the fixes :) I'm slow on the patch formatting etc.
Hopefully these are all taken care of now between the two patches.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap
2023-06-01 10:05 [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap ro at gcc dot gnu.org
` (9 preceding siblings ...)
2023-06-02 16:41 ` david.faust at oracle dot com
@ 2023-06-29 8:00 ` iains at gcc dot gnu.org
2023-06-29 8:47 ` ro at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: iains at gcc dot gnu.org @ 2023-06-29 8:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073
--- Comment #10 from Iain Sandoe <iains at gcc dot gnu.org> ---
this is fixed, at least on Darwin, right?
is there some failing case remaining on Solaris or can we close this?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap
2023-06-01 10:05 [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap ro at gcc dot gnu.org
` (10 preceding siblings ...)
2023-06-29 8:00 ` iains at gcc dot gnu.org
@ 2023-06-29 8:47 ` ro at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: ro at gcc dot gnu.org @ 2023-06-29 8:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #11 from Rainer Orth <ro at gcc dot gnu.org> ---
Solaris is fine, so I think we're good.
^ permalink raw reply [flat|nested] 13+ messages in thread