Re: undefined references since newlib-3.2.0

Keith Packard via Newlib <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Dimitrios Glynos <[email protected]> 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
signature.asc (application/pgp-signature, 832 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAl7oP+kACgkQ2yIaaQAA
ABEIZg/9GhVFr8uVufYLl3tiEGzb+ihMcm1A9jj/BT6QndnJ9yCgk1gHs/gl7c2t
LZxO/pKhDcvHujzP34TTAX4paQmJASHbevWBCtu0MSQWDlk88hKe/j96nbJaKbfe
QbZYN9waTzdSrE/ZOEF9EMCNzLUx+iCwd1JZitYAwva3qbGlRDWiGlAL8rfJIr70
1wFPrVQZ3ExNQKQrf9+fQugOJG9Hho/UZiqXpb5FP+t+zRy1FwQOxCdo+b/GpL31
xllSkG2ER5qMdpSQH4z3K/3263TPlJz3sUP0835fwzmKczD95eZJ0fi/wXB8s5Lt
JkDEUzUsow6sTTI2ZlysorqKKoMhSDCACjYOti4UhjjqdAC/R80Dtdtck8pLB4ZJ
Wg+rTO3OdGGEGjtXPt2RQ+Y4OgwLVbYwErvWc4wGGbagEft2+5/Yr93puF4+exAf
tbYc6uU1kq2qj5eWf4Uh11qodZm/GoZi26ghfBUKEIBFuqYa3XIwkTf24UcJv4Fe
LUwdpjVIHBVqcLxUygA9YW1TOAciWR4l3ah6KZtW/eh7nSet112QAA6DYvrhESN/
OQZQGrA9xWXRNB8QDyanhIxEh14Y0U4lKF1ICg8nC/jmRGPA2ZYK5Azpihs1u2sH
v7txQ0G34IdVk65rx/J7GlWCWmQGqeokTI+02ot3IfJE1DUU47E=
=F++g
-----END PGP SIGNATURE-----
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.