This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug string/19907] New: Incorrect memory/string tests
- From: "hjl.tools at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 04 Apr 2016 15:35:16 +0000
- Subject: [Bug string/19907] New: Incorrect memory/string tests
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=19907
Bug ID: 19907
Summary: Incorrect memory/string tests
Product: glibc
Version: 2.24
Status: NEW
Severity: normal
Priority: P2
Component: string
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
Many memory/string tests, like string/test-memcpy.c and
benchtests/bench-memcpy.c, have
static void
do_one_test (impl_t *impl, char *dst, const char *src,
size_t len)
{
if (CALL (impl, dst, src, len) != MEMCPY_RESULT (dst, len))
{
error (0, 0, "Wrong result in function %s %p %p", impl->name,
CALL (impl, dst, src, len), MEMCPY_RESULT (dst, len));
ret = 1;
return;
}
if (memcmp (dst, src, len) != 0)
{
error (0, 0, "Wrong result in function %s dst %p \"%.*s\" src %p \"%.*s\"
len %zu",
impl->name, dst, (int) len, dst, src, (int) len, src, len);
ret = 1;
return;
}
}
it doesn't clear destination set by the previous run. They wont catch
the error when the following implementations do copy anything since
the destination buffer is unchanged from the last run.
--
You are receiving this mail because:
You are on the CC list for the bug.