[Bug libfortran/53444] New: Accommodate non-compliant strerror_r() on VxWorks.
rbmj at verizon dot net
gcc-bugzilla@gcc.gnu.org
Tue May 22 04:52:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53444
Bug #: 53444
Summary: Accommodate non-compliant strerror_r() on VxWorks.
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rbmj@verizon.net
Created attachment 27469
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27469
Fix - just use two arguments without buflen
On VxWorks, strerror_r() does not take a third argument.
This patch just uses the two arguments and *hopes* that we have enough space
allocated. There does not appear to be a way to avoid the potential for a
buffer overflow.
At least we can pretty safety assume that the system error messages won't be
overly long.
The alternative is to fall back on strerror(), but that has reentrancy issues.
More information about the Gcc-bugs
mailing list