Age | Commit message (Collapse) | Author | Files | Lines |
|
Non-root users may be able to set real-time scheduling policies. Don't
expect failure to set real-time scheduling policies based on UID.
Instead, check that if it fails, it is either due to missing privileges,
or unsupported parameters if the scheduling policy is not mandated by
POSIX.
Fixes #95564.
|
|
Fixes:
llvm-project/libc/src/__support/OSUtil/linux/fcntl.cpp:63:26: error:
implicit conversion loses integer precision: '__off64_t' (aka 'long
long')
to '__off_t' (aka 'long') [-Werror,-Wshorten-64-to-32]
flk->l_start = flk64.l_start;
~ ~~~~~~^~~~~~~
llvm-project/libc/src/__support/OSUtil/linux/fcntl.cpp:64:24: error:
implicit conversion loses integer precision: '__off64_t' (aka 'long
long')
to '__off_t' (aka 'long') [-Werror,-Wshorten-64-to-32]
flk->l_len = flk64.l_len;
~ ~~~~~~^~~~~
We already have an overflow check, just need the cast to be explicit.
This
warning was observed on the 32b ARM build in overlay mode.
|
|
Fixes https://github.com/llvm/llvm-project/issues/95638
The check was `if(unsigned_num >= 0)` which will always be true. The
intent was to check for zero, but the `for` loop inside the `if` was
already doing that.
|
|
|
|
|
|
malloc in overlay mode. (#95845)
This causes an issue in overlay mode:
https://github.com/llvm/llvm-project/pull/95736#issuecomment-2172739705
|
|
Summary:
Not all platforms support this function or header, but it was being
included by every test. Move it inside of the `ifdef` for the only user,
which is aarch64.
|
|
|
|
Fixes #93711 .
This patch implements the ``fdopen`` function. Given that ``fdopen``
internally calls ``fcntl``, the implementation of ``fcntl`` has been
moved to the ``__support/OSUtil``, where it serves as an internal public
function.
|
|
(#95619)
This reverts commit eca988aa4420f33810f9830c80ff9f149b7928ff. The
underlying libc issue was fixed by PR#95576.
The original PR is #95436 , which adds printf, putchar and vprintf in
bareemetal entrypoints
|
|
|
|
Bitfield conversion problem tested at: https://godbolt.org/z/dxjhs5Ghr
|
|
|
|
|
|
Add the LIBC_INLINE annotation to all the functions in blockstore.
|
|
The putchar header was including the public stdio.h. It doesn't need to
do that and it was causing build failures for downstream baremetal users
so this patch fixes it.
|
|
This refactors some of the FreeListHeap, FreeList, and Block classes to
have constexpr ctors so we can constinit a global allocator that does
not require running some global function or global ctor to initialize.
This is needed to prevent worrying about initialization order and any
other module-ctor can invoke malloc without worry.
|
|
This reverts commit b1de42a81d838bb0c6dea7d2436820a2456c730b, which
breaks libc build for baremetal targets.
|
|
Issue: NamedType<"fenv_t"> and NamedType<"fexcept_t"> were used in Fenv
HeaderSpec Types section instead of the actual NamedType
Fixed: Changed to FEnvT and FExceptT
|
|
Part of #93566.
|
|
We now have baremetal implementations of these entrypoints.
|
|
This is similar to baremetal printf that was implemented in #94078.
|
|
Reverts llvm/llvm-project#95419 and Reland #95358.
This PR is full of temporal fixes. After a discussion with @lntue, it is
better to avoid further changes to the cmake infrastructure for now as a
rework to the cmake utilities will be landed in the future.
|
|
Some of the freelist code uses type punning which is UB in C++, namely
because we read from a union member that is not the active union member.
|
|
See Buildbot failures:
- https://lab.llvm.org/buildbot/#/builders/78/builds/13
- https://lab.llvm.org/buildbot/#/builders/182/builds/7
|
|
|
|
Part of #95250.
|
|
|
|
|
|
This is the actual freelist allocator which utilizes the generic
FreeList and the Block classes. We will eventually wrap the malloc
interface around this.
This is a part of #94270 to land in smaller patches.
|
|
|
|
|
|
Summary:
Currently we use `(~0U)` for this definition, however the ~ operator
returns a different sign, meaning that preprocessor checks against this
value will fail. See https://godbolt.org/z/TrjaY1d8q where the
preprocessor thinks that it's not `0xffffffff` while the static
assertion thinks it is. This is because the latter does implicit
conversion but the preprocessor does not. This is now consistent with
other headers.
|
|
In #94685 I discussed my ideas for cleaner baremetal output writing.
This patch is not that. This patch just uses `write_to_stderr` for
outputting from putchar and printf on baremetal. I'm still planning to
create a proper design for writing to stdout and stderr on various
platforms, but that will be a followup patch.
|
|
Part of #93566.
|
|
They were assigned from calls to find_chunk_ptr_for_size which return
size_t now.
|
|
This implements a traditional freelist to be used by the freelist
allocator. It operates on spans of bytes which can be anything. The
freelist allocator will store Blocks inside them.
This is a part of #94270 to land in smaller patches.
|
|
|
|
(#95038)
…IB_FREE_H
|
|
{rint,lrint,llrint,lround,llround}f16 (#94473)
|
|
A block represents a chunk of memory used by the freelist allocator. It
contains header information denoting the usable space and pointers as
offsets to the next and previous block.
On it's own, this doesn't do much. This is a part of
https://github.com/llvm/llvm-project/pull/94270 to land in smaller
patches.
This is a subset of pigweed's freelist allocator implementation.
|
|
{ceil,floor,round,roundeven,trunc}f16 (#94383)" (#94807)
This reverts commit cbe97e959dc67503d7cc44a3810e3124b6d3340e.
|
|
See Buildbot failure:
https://lab.llvm.org/buildbot/#/builders/229/builds/27009.
|
|
Part of #93566.
|
|
See Buildbot failures:
- https://lab.llvm.org/buildbot/#/builders/257/builds/13450
- https://lab.llvm.org/buildbot/#/builders/256/builds/14531
|
|
|
|
See Buildbot failure:
https://lab.llvm.org/buildbot/#/builders/138/builds/67428.
|
|
(#94758)
Part of #93566.
|
|
Part of #93566.
|
|
Added remquof128 function. Closes #94312
|