public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/17263] New: [powerpc] __get_clockfreq broken for 32-bit non-power4 glibc
@ 2014-08-12 21:29 jsm28 at gcc dot gnu.org
  2014-08-13 16:07 ` [Bug libc/17263] " cvs-commit at gcc dot gnu.org
  2014-08-13 16:07 ` jsm28 at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2014-08-12 21:29 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=17263

            Bug ID: 17263
           Summary: [powerpc] __get_clockfreq broken for 32-bit non-power4
                    glibc
           Product: glibc
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org
                CC: drepper.fsp at gmail dot com
              Host: powerpc*-*-*

sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c uses the VDSO to get an
hp_timing_t result.  The VDSO always provides a 64-bit result, but hp_timing_t
is 32-bit if the power4 sysdeps directories aren't used, resulting in only r3
(the high part of the result, = 0) being used, a value of 0 being returned and
test-gettimebasefreq failing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug libc/17263] [powerpc] __get_clockfreq broken for 32-bit non-power4 glibc
  2014-08-12 21:29 [Bug libc/17263] New: [powerpc] __get_clockfreq broken for 32-bit non-power4 glibc jsm28 at gcc dot gnu.org
  2014-08-13 16:07 ` [Bug libc/17263] " cvs-commit at gcc dot gnu.org
@ 2014-08-13 16:07 ` jsm28 at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2014-08-13 16:07 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=17263

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Fixed for 2.20.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug libc/17263] [powerpc] __get_clockfreq broken for 32-bit non-power4 glibc
  2014-08-12 21:29 [Bug libc/17263] New: [powerpc] __get_clockfreq broken for 32-bit non-power4 glibc jsm28 at gcc dot gnu.org
@ 2014-08-13 16:07 ` cvs-commit at gcc dot gnu.org
  2014-08-13 16:07 ` jsm28 at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-08-13 16:07 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=17263

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  d44a052c499a3e2908862cff28cdb85d8aec246f (commit)
      from  e44c8b0eb7339787fbc6b1d4a2d1bd5046bc103f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d44a052c499a3e2908862cff28cdb85d8aec246f

commit d44a052c499a3e2908862cff28cdb85d8aec246f
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Aug 13 16:06:18 2014 +0000

    Fix powerpc32 __get_clockfreq for non-power4 (bug 17263).

    In my powerpc32 testing I've observed misc/test-gettimebasefreq
    failing.

    This is a glibc build (soft-float, though that's not relevant here)
    without any --with-cpu and without any special configuration of the
    default CPU for GCC either.  In particular, it's one not using
    sysdeps/powerpc/powerpc32/power4/hp-timing.h (although in fact the
    processor I'm using for testing is POWER4-based), so hp_timing_t is
    32-bit not 64-bit.  But the VDSO call being used by
    INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK is generating a 64-bit result
    (high part in r3, low part in r4).  The code extracting that result,
    however, expects a result of the type hp_timing_t as passed to
    INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK, meaning that only r3 (= 0) is
    used and the value in r4 is ignored.  This patch fixes this by always
    using uint64_t as the type in INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK -
    reflecting the actual ABI (unconditional in the kernel) of that VDSO
    call.  This is the minimal change for this issue - no check for
    overflow, no change of the type of the timebase_freq variable or the
    return type of __get_clockfreq to something other than hp_timing_t
    (such a change would simply move the implicit conversions to the over
    callers of that function), no change to hp_timing_t itself.

    Tested for powerpc32 soft float.

        [BZ #17263]
        * sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c: Include
        <stdint.h>.
        (__get_clockfreq): Use uint64_t instead of hp_timing_t in
        INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK call.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                       |    8 ++++++++
 NEWS                                            |    2 +-
 sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c |    3 ++-
 3 files changed, 11 insertions(+), 2 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

end of thread, other threads:[~2014-08-13 16:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-12 21:29 [Bug libc/17263] New: [powerpc] __get_clockfreq broken for 32-bit non-power4 glibc jsm28 at gcc dot gnu.org
2014-08-13 16:07 ` [Bug libc/17263] " cvs-commit at gcc dot gnu.org
2014-08-13 16:07 ` 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).