From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C9D52385783E; Thu, 13 Jan 2022 21:24:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9D52385783E From: "ross at burtonini dot com" To: systemtap@sourceware.org Subject: [Bug translator/28778] New: printf() generated code causes GCC errors Date: Thu, 13 Jan 2022 21:24:29 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ross at burtonini dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2022 21:24:29 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28778 Bug ID: 28778 Summary: printf() generated code causes GCC errors Product: systemtap Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: translator Assignee: systemtap at sourceware dot org Reporter: ross at burtonini dot com Target Milestone: --- With a trivial probe using printf: probe oneshot { printf("Hello, %s\n", "world!") } I get GCC errors: In file included from /usr/share/systemtap/runtime/linux/print.c:18, from /usr/share/systemtap/runtime/print.c:17, from /usr/share/systemtap/runtime/runtime_context.h:22, from /tmp/stapGu6dBo/stap_3672_src.c:54: /usr/share/systemtap/runtime/vsprintf.c: In function '_stp_vsprint_memory_size.constprop': /usr/share/systemtap/runtime/vsprintf.c:413:23: error: 'strnlen' specified bound 4294967295 may exceed maximum object size 2147483647 [-Werror=3Dstringop-overread] 413 | len =3D strnlen(ptr, precision); | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/share/systemtap/runtime/vsprintf.c: In function '_stp_vsprint_memory.constprop': /usr/share/systemtap/runtime/vsprintf.c:341:23: error: 'strnlen' specified bound 4294967295 may exceed maximum object size 2147483647 [-Werror=3Dstringop-overread] 341 | len =3D strnlen(ptr, precision); | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Kernel 5.10.97, SystemTap 4.6, GCC 11.2 on qemu-system-arm (32-bit). --=20 You are receiving this mail because: You are the assignee for the bug.=