commit | 81d8273978ace8b9a2b8cfd811b94e95f9560ac5 | [log] [tgz] |
---|---|---|
author | Simon Tatham <simon.tatham@arm.com> | Wed Aug 07 04:51:25 2024 +0100 |
committer | GitHub <noreply@github.com> | Tue Aug 06 20:51:25 2024 -0700 |
tree | e8681eede82627f67bb8b27e6ff02c0335ff788f | |
parent | ee870e593a82a6478ff1d8b3f1bd8a45aa1bf650 [diff] |
[libc] Fix overflow check for 32-bit mktime. (#101993) The 32-bit time_t rolls over to a value with its high bit set at 2038-01-19 03:14:07. The overflow check for this in mktime() was checking each individual component of the time: reject if year>2038, or if month>1, or if day>19, etc. As a result it would reject valid times before the overflow point, because a low-order component was out of range even though a higher-order one makes the time as a whole safe. The earliest failing value is 2145916808 == 2038-01-01 00:00:08, in which only the seconds field 'overflows'. Fixed so that if any component is _less_ than its threshold value, we don't check the lower-order components.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.