This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18950] New: How memcmp handles negative values for size_t
- From: "atul.singh008 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 11 Sep 2015 11:26:20 +0000
- Subject: [Bug libc/18950] New: How memcmp handles negative values for size_t
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=18950
Bug ID: 18950
Summary: How memcmp handles negative values for size_t
Product: glibc
Version: 2.11
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: atul.singh008 at gmail dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
We are working on GLIBC-2.11 and GCC=4.4 a.
But while using memcmp with size as negative, it always return zero even though
the memory block are different.
So I am confused about how the negative value is getting handle for glibc
version 2.11.
But if I use the same test case with glibc-2.15 and gcc-4.6 it works fine.
So can anyone please let me know how the negative value for size is getting
properly handled for glibc-2.15 and not in glibc-2.11.
Please find the attached test case for your reference.
And the command I use to build the test case is as follows:
gcc tc.c -o tc -tcore2 -static
Also the assembly instruction(glibc /sysdeps/i386/i686/memcmp.S) I look is not
handling the negative value, then where is the negative values getting handled.
It will be of great help if you provide any documented reference regarding
handling negative values.
--
You are receiving this mail because:
You are on the CC list for the bug.