Re: [PATCH 4/5] bugs/x86: Augment warnings output by concatenating 'cond_str' with the regular __FILE__ string in _BUG_FLAGS()
From: Ingo Molnar
Date: Thu Mar 27 2025 - 17:18:53 EST
* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, 27 Mar 2025 at 02:36, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> >
> > BTW., any reason why we go all the trouble with the bug_entry::line u16
> > number, instead of storing it in the bug_entry::file string with a
> > :__LINE__ postfix or so?
>
> The compiler will happily share the same storage for identical
> strings, so that was an issue: re-using the same memory for the same
> filename being repeated multiple times.
ohhh ... TIL.
> That obviously doesn't work anyway once you add the warning string to
> it, so that makes that whole argument go away.
Yeah. Explains the +100K increase in .data as well, which was more than
what I expected.
Thanks,
Ingo