This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/13080] New: clock() is unusable on 32-bit targets due to wrong type for clock_t


http://sourceware.org/bugzilla/show_bug.cgi?id=13080

             Bug #: 13080
           Summary: clock() is unusable on 32-bit targets due to wrong
                    type for clock_t
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: bugdal@aerifal.cx
    Classification: Unclassified


glibc defines clock_t as signed long rather than unsigned long. On 32-bit
targets where the value can wrap, this makes it impossible to subtract clock_t
values to measure intervals (signed overflow results in undefined behavior).
This issue is easily fixed by changing the definition of clock_t on 32-bit
targets to unsigned long, and doing so should not result in any API or ABI
breakage.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]