Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Apr 2024 08:05:32 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 276104] [exp-run] Against llvm-18-update branch on GitHub
Message-ID:  <bug-276104-7788-p4IWGmLlIj@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-276104-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-276104-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276104

--- Comment #148 from commit-hook@FreeBSD.org ---
A commit in branch stable/13 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=3Db9b248b1df62579913ce93ef4583e185e=
798a717

commit b9b248b1df62579913ce93ef4583e185e798a717
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-04-25 16:47:31 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-04-28 08:04:33 +0000

    Merge commit 0f329e0246d1 from llvm-project (by Dimitry Andric):

      [sanitizer_symbolizer] Cast arguments for format strings in markup
(#89815)

      When compiling the common sanitizer libraries, there are many warnings
      about format specifiers, similar to:

=20=20=20=20=20=20=20=20=20
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:31:32:
warning: format specifies type 'void *' but the argument has type 'uptr' (a=
ka
'unsigned long') [-Wformat]
             31 |   buffer->AppendF(kFormatData, DI->start);
                |                   ~~~~~~~~~~~  ^~~~~~~~~
=20=20=20=20=20=20=20=20=20
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:33=
:46:
note: format string is defined here
             33 | constexpr const char *kFormatData =3D "{{{data:%p}}}";
                |                                              ^~
                |                                              %lu
=20=20=20=20=20=20=20=20=20
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:46:43:
warning: format specifies type 'void *' but the argument has type 'uptr' (a=
ka
'unsigned long') [-Wformat]
             46 |   buffer->AppendF(kFormatFrame, frame_no, address);
                |                   ~~~~~~~~~~~~            ^~~~~~~
=20=20=20=20=20=20=20=20=20
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:36=
:48:
note: format string is defined here
             36 | constexpr const char *kFormatFrame =3D "{{{bt:%u:%p}}}";
                |                                                ^~
                |                                                %lu
          ...

      This is because `uptr` is dependent on the platform, and can be either
      `unsigned long long`, `unsigned long`, or `unsigned int`.

      To fix the warnings, cast the arguments to the expected type of the
      format strings.

    PR:             276104
    Reported by:    pstef
    MFC after:      3 days

    (cherry picked from commit f08bf5a3acf146b17794fbde41279645ddbaa086)

 .../lib/sanitizer_common/sanitizer_symbolizer_markup.cpp       | 10 ++++++=
----
 .../sanitizer_common/sanitizer_symbolizer_markup_constants.h   |  6 +++---
 2 files changed, 9 insertions(+), 7 deletions(-)

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-276104-7788-p4IWGmLlIj>