This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/16430] New: PowerPC: ftime gettimeofday internal call returning bogus data
- From: "azanella at linux dot vnet.ibm.com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 10 Jan 2014 16:48:42 +0000
- Subject: [Bug libc/16430] New: PowerPC: ftime gettimeofday internal call returning bogus data
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16430
Bug ID: 16430
Summary: PowerPC: ftime gettimeofday internal call returning
bogus data
Product: glibc
Version: 2.19
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: azanella at linux dot vnet.ibm.com
CC: drepper.fsp at gmail dot com
The testcase:
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/timeb.h>
int
main ()
{
struct timeval tv;
struct timeb s, slast;
int c = 0;
ftime (&slast);
while (c < 10)
{
ftime (&s);
if (s.time < slast.time
|| (s.time == slast.time && s.millitm < slast.millitm))
exit (1);
if (s.time != slast.time)
++c;
slast.time = s.time;
slast.millitm = s.millitm;
}
exit (0);
}
Is failing for PPC32 after ef26eece6331a1f6d959818e37c438cc7ce68e53 (PowerPC:
gettimeofday optimization by using IFUNC). This is due the fact linker is not
setting the gettimeofday call from ftime through a PLT, as PPC64; and thus
calling __gettimeofday ifunc resolver directly.
A possible fix would be detect a PPC32 build and set the internal symbol
'__GI___gettimeofday' to a different implementation than the ifunc resolver.
--
You are receiving this mail because:
You are on the CC list for the bug.