From: bugzilla-daemon@kernel.org
To: linuxppc-dev@lists.ozlabs.org
Subject: [Bug 216090] New: GCC12: printk.h:446:44: error: using a dangling pointer to '__str'
Date: Tue, 07 Jun 2022 02:26:24 +0000 [thread overview]
Message-ID: <bug-216090-206035@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=216090
Bug ID: 216090
Summary: GCC12: printk.h:446:44: error: using a dangling
pointer to '__str'
Product: Platform Specific/Hardware
Version: 2.5
Kernel Version: 5.17.13
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: PPC-64
Assignee: platform_ppc-64@kernel-bugs.osdl.org
Reporter: vt@altlinux.org
Regression: Yes
There is build error on GCC 12:
[00:00:26] CC arch/powerpc/kernel/trace/ftrace.o
[00:00:26] In file included from ./include/asm-generic/bug.h:22,
[00:00:26] from ./arch/powerpc/include/asm/bug.h:149,
[00:00:26] from ./include/linux/bug.h:5,
[00:00:26] from ./include/linux/thread_info.h:13,
[00:00:26] from ./include/asm-generic/preempt.h:5,
[00:00:26] from
./arch/powerpc/include/generated/asm/preempt.h:1,
[00:00:26] from ./include/linux/preempt.h:78,
[00:00:26] from ./include/linux/spinlock.h:55,
[00:00:26] from arch/powerpc/kernel/trace/ftrace.c:16:
[00:00:26] arch/powerpc/kernel/trace/ftrace.c: In function
'ftrace_modify_code':
[00:00:26] ./include/linux/printk.h:446:44: error: using a dangling pointer
to '__str' [-Werror=dangling-pointer=]
[00:00:26] 446 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt,
##__VA_ARGS__)
[00:00:26] | ^
[00:00:26] ./include/linux/printk.h:418:17: note: in definition of macro
'printk_index_wrap'
[00:00:26] 418 | _p_func(_fmt, ##__VA_ARGS__);
\
[00:00:26] | ^~~~~~~
[00:00:26] ./include/linux/printk.h:489:9: note: in expansion of macro
'printk'
[00:00:26] 489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
[00:00:26] | ^~~~~~
[00:00:26] arch/powerpc/kernel/trace/ftrace.c:76:17: note: in expansion of
macro 'pr_err'
[00:00:26] 76 | pr_err("%p: replaced (%s) != old (%s)",
[00:00:26] | ^~~~~~
[00:00:26] In file included from
./arch/powerpc/include/asm/code-patching.h:14,
[00:00:26] from arch/powerpc/kernel/trace/ftrace.c:27:
[00:00:26] ./arch/powerpc/include/asm/inst.h:156:14: note: '__str' declared
here
[00:00:26] 156 | char __str[PPC_INST_STR_LEN]; \
[00:00:26] | ^~~~~
[00:00:26] ./include/linux/printk.h:418:33: note: in expansion of macro
'ppc_inst_as_str'
[00:00:26] 418 | _p_func(_fmt, ##__VA_ARGS__);
\
[00:00:26] | ^~~~~~~~~~~
[00:00:26] ./include/linux/printk.h:446:26: note: in expansion of macro
'printk_index_wrap'
[00:00:26] 446 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt,
##__VA_ARGS__)
This may be related discussion:
https://lore.kernel.org/all/20220601162023.GW25951@gate.crashing.org/T/
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next reply other threads:[~2022-06-07 2:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-07 2:26 bugzilla-daemon [this message]
2022-06-07 8:33 ` [Bug 216090] GCC12: printk.h:446:44: error: using a dangling pointer to '__str' bugzilla-daemon
2022-07-29 6:57 ` bugzilla-daemon
2022-07-29 6:57 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-216090-206035@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).