Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.1.2
-
None
-
IRIX 6.5
Description
The program below aborts at runtime when compiled with SGI MIPSpro and run on SGI IRIX 6.5. Note that IRIX doesn't define wmemcpy (the macros _RWSTD_MO_WMEMCPY and _RWSTD_MO_WMEMCPY_IN_LIBC are both defined) so the called function must be ours.
$ cat t.cpp && nice gmake t -r && LD_LIBRARY_PATH=../lib ./t
#include <cassert>
#include <cwchar>
int main ()
{
wchar_t dst [4] =
;
std::wmemcpy (dst, L"abc", 3);
assert (L'a' == dst [0]);
assert (L'b' == dst [1]);
assert (L'c' == dst [2]);
assert (L'\3' == dst [3]);
}
CC -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG -D_REENTRANT -D_RWSTD_USE_CONFIG -I/build/sebor/mipspro-7.41-15d/include -I/build/sebor/dev/stdlib/include -I/build/sebor/dev/stdlib/examples/include -g -ansiW -woff1429,1460,1521,3150,3333 t.cpp
CC t.o -o t -LANG:std=off -Wl,-woff,84 -L/build/sebor/mipspro-7.41-15d/lib -lpthread -L/build/sebor/mipspro-7.41-15d/lib -lstd15d -lm
rm t.o
Assertion failed: L'b' == dst [1], file t.cpp, line 10, pid B86430
Abort (core dumped)