snprintf in newlib-3.3.0 vs 3.1.0

Dave Flogeras via Newlib <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CANB0TnSU2sgfj65d1TOV_8zwfxXNtdbfohXHv=BreWgDp7OshQ@mail.gmail.com>
Hi list,

I use a Gentoo crossdev toolchain for developing armv7m microcontroller
code.  Recently Gentoo switched to newlib-3.3.0 as a result of the CVEs
reported in pre-3.3.0 releases.

I noticed a fairly significant increase (about 6k) in my .data section of a
project after upgrading the toolchain.  All else is held equal, the newlib
3.1.0 -> 3.3.0 upgrade is the only change.  Looking at the map/list files,
it seems related to my usage of s(n)print.  Is this much increase to be
expected, or am I potentially suffering from a misconfiguration?  Certainly
not exhaustive, but the main size offenders seem to be new functions being
linked in _vfiprintf_r and __sfvwrite_r.

I noticed that the default of REENT_CHECK_VERIFY was switched from false to
true, so I tried recompiling with that reverted to false, but it didn't
seem to change the outcome.

Not a huge deal, I just wanted to know if it is expected, or something gone
awry.

Any advise is appreciated
Best regards,
Dave
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.