[Toybox] The new gcc 9 bug you pointed out.
Rob Landley
rob at landley.net
Wed May 8 02:00:30 PDT 2019
Sorry I can't reply to your email, I haven't moved off gmail yet and it's got to
the "sometimes unsubscribing me more than once per day" stage of decay. I hadn't
cleaned out the spam filter since Sunday so of course it had false positived on
another 30 messages from the buildroot list and such since then, and spurious
gmail bounce du jour unsubscribed me from the toybox list after my earlier post
today, which I didn't notice until just now, by which point your email had gone
by unforwarded. (Mailman doesn't queue up messages that come in while
subscription is disabled, I have to check the mailing list web archive each time
I'm unsubscribed to see what I missed.)
Anyway, you said:
> Rob, this may also have an effect in toybox, ?maybe?
And pulling up https://gitlab.gnome.org/GNOME/glib/merge_requests/626 ... not
that I know of?
They removed the debugging feature where printf("%s", NULL) would print "(null)"
instead of segfaulting trying to dereference the string. I never (intentionally)
relied on that outside of debug printfs (and have used libc's that segfaulted on
it before).
Removing it seems kinda stupid, it's not the compiler's business to do so (it
would be the C library's), and making it an error instead of a warning is just
laughable. It seriously looks like gcc is end of life and I'm glad llvm isn't
being done by crazy people.
But I'm unaware of _this_ particular bit of gcc stupidity hitting us? (And the
fix would be adding another -fstop-being-stupid anyway. Possibly disabling
printf() format detection entirely if it has such bad side effects. Building
with llvm would still find printf format/argument mismatches if so. "I fed it a
char *" is all it should care about, what's _in_ the char * at _runtime_ is my
business, not the compiler's.)
Rob
More information about the Toybox
mailing list