From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28270 invoked by alias); 10 Jan 2014 16:48:48 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 28031 invoked by uid 48); 10 Jan 2014 16:48:43 -0000 From: "azanella at linux dot vnet.ibm.com" To: glibc-bugs@sourceware.org Subject: [Bug libc/16430] New: PowerPC: ftime gettimeofday internal call returning bogus data Date: Fri, 10 Jan 2014 16:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.19 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: azanella at linux dot vnet.ibm.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg00150.txt.bz2 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 #include #include #include #include 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.