undefined references since newlib-3.2.0

Keith Packard keithp@keithp.com
Tue Jun 16 03:43:37 GMT 2020


Dimitrios Glynos <dimitris@census-labs.com> writes:

> For these reasons, I had proposed for case (b) the introduction of a
> function that would be implemented by the developer, and would handle
> non-reported out-of-memory conditions. Developers already supply
> implementations for system calls on bare bones devices, and this could
> be a similar concept to that.

I'd suggest that this new application-supplied function would be defined
to return normally, and that the library would then return a "safe"
value back to the application to provide a well-defined flow of control
even in this case.

> Finally, it would be beneficial for all if both projects
> (picolibc and newlib) filed a comment to the standards group
> stating the cases where an ENOMEM was found useful but was not
> covered by the standard.

Yeah, fortunately in the default configuration, picolibc doesn't have
any cases like this at this point. In that configuration, picolibc will
only call malloc for operations which already have well defined
out-of-memory behavior (e.g. strdup). It's only if you switch to the
original newlib stdio code that you hit these cases due to the use of
the multi-precision math code in that path.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/newlib/attachments/20200615/0f4093ad/attachment.sig>


More information about the Newlib mailing list