public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/16430] New: PowerPC: ftime gettimeofday internal call returning bogus data
@ 2014-01-10 16:48 azanella at linux dot vnet.ibm.com
  2014-01-10 16:54 ` [Bug libc/16430] " azanella at linux dot vnet.ibm.com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: azanella at linux dot vnet.ibm.com @ 2014-01-10 16:48 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-08-27 22:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-10 16:48 [Bug libc/16430] New: PowerPC: ftime gettimeofday internal call returning bogus data azanella at linux dot vnet.ibm.com
2014-01-10 16:54 ` [Bug libc/16430] " azanella at linux dot vnet.ibm.com
2014-01-10 16:55 ` adconrad at 0c3 dot net
2014-01-10 19:51 ` azanella at linux dot vnet.ibm.com
2014-01-13 12:03 ` azanella at linux dot vnet.ibm.com
2014-01-16 13:18 ` azanella at linux dot vnet.ibm.com
2014-01-16 16:41 ` carlos at redhat dot com
2014-01-16 16:58 ` adconrad at 0c3 dot net
2014-01-16 17:05 ` CoreyMutter at eaton dot com
2014-01-17 11:34 ` azanella at linux dot vnet.ibm.com
2014-02-07  3:24 ` [Bug libc/16430] [powerpc] " jsm28 at gcc dot gnu.org
2014-06-13  9:04 ` fweimer at redhat dot com
2015-01-23 13:00 ` azanella at linux dot vnet.ibm.com
2015-08-27 22:20 ` [Bug time/16430] " jsm28 at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).