<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libc/test, branch users/makslevental/ptr-dialectpython</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[libc] Disable overflow test in strfromtest on riscv32 (#166719)</title>
<updated>2025-11-06T20:55:16+00:00</updated>
<author>
<name>Marcell Leleszi</name>
<email>59964679+mleleszi@users.noreply.github.com</email>
</author>
<published>2025-11-06T20:55:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6adf99338832966dcf3477e112b158cd588ac584'/>
<id>6adf99338832966dcf3477e112b158cd588ac584</id>
<content type='text'>
Looks like https://github.com/llvm/llvm-project/pull/166517 is breaking
libc-riscv32-qemu-yocto-fullbuild-dbg build due to failing overflow test
for strfrom.
https://lab.llvm.org/buildbot/#/changes/58668

```
int result = func(buff, sizeof(buff), "%.2147483647f", 1.0f);
EXPECT_LT(result, 0);
ASSERT_ERRNO_FAILURE();
```

```
[ RUN      ] LlvmLibcStrfromdTest.CharsWrittenOverflow
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/test/src/stdlib/StrfromTest.h:493: FAILURE
       Expected: result
       Which is: 0
To be less than: 0
       Which is: 0
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/test/src/stdlib/StrfromTest.h:494: FAILURE
          Expected: 0
          Which is: 0
To be not equal to: static_cast&lt;int&gt;(libc_errno)
          Which is: 0
[  FAILED  ] LlvmLibcStrfromdTest.CharsWrittenOverflow
Ran 8 tests.  PASS: 7  FAIL: 1
```

At first glance it seem like there is some kind of overflow in
internal::strfromfloat_convert on 32bit archs because the other overflow
test case is passing for snprintf. Interestingly, it passes on all other
buildbots, including libc-arm32-qemu-debian-dbg.

This issue likely wasn't introduced by
https://github.com/llvm/llvm-project/pull/166517 and was probably
already present, so I'm not reverting the change just disabling the test
case on riscv32 until I can debug properly.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Looks like https://github.com/llvm/llvm-project/pull/166517 is breaking
libc-riscv32-qemu-yocto-fullbuild-dbg build due to failing overflow test
for strfrom.
https://lab.llvm.org/buildbot/#/changes/58668

```
int result = func(buff, sizeof(buff), "%.2147483647f", 1.0f);
EXPECT_LT(result, 0);
ASSERT_ERRNO_FAILURE();
```

```
[ RUN      ] LlvmLibcStrfromdTest.CharsWrittenOverflow
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/test/src/stdlib/StrfromTest.h:493: FAILURE
       Expected: result
       Which is: 0
To be less than: 0
       Which is: 0
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/test/src/stdlib/StrfromTest.h:494: FAILURE
          Expected: 0
          Which is: 0
To be not equal to: static_cast&lt;int&gt;(libc_errno)
          Which is: 0
[  FAILED  ] LlvmLibcStrfromdTest.CharsWrittenOverflow
Ran 8 tests.  PASS: 7  FAIL: 1
```

At first glance it seem like there is some kind of overflow in
internal::strfromfloat_convert on 32bit archs because the other overflow
test case is passing for snprintf. Interestingly, it passes on all other
buildbots, including libc-arm32-qemu-debian-dbg.

This issue likely wasn't introduced by
https://github.com/llvm/llvm-project/pull/166517 and was probably
already present, so I'm not reverting the change just disabling the test
case on riscv32 until I can debug properly.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix stale char_ptr for find_first_character_wide read (#166594)</title>
<updated>2025-11-06T14:48:14+00:00</updated>
<author>
<name>Sterling-Augustine</name>
<email>saugustine@google.com</email>
</author>
<published>2025-11-06T14:48:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7ff8a5175428361e90c7bd7fd765192bec42be42'/>
<id>7ff8a5175428361e90c7bd7fd765192bec42be42</id>
<content type='text'>
On exit from the loop, char_ptr had not been updated to match block_ptr,
resulting in erroneous results. Moving all updates out of the loop fixes
that.

Adjust derefences to always be inside bounds checks.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On exit from the loop, char_ptr had not been updated to match block_ptr,
resulting in erroneous results. Moving all updates out of the loop fixes
that.

Adjust derefences to always be inside bounds checks.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[libc] Return errno from OFD failure paths in fcntl." (#166658)</title>
<updated>2025-11-05T23:08:55+00:00</updated>
<author>
<name>Jackson Stogel</name>
<email>jtstogel@gmail.com</email>
</author>
<published>2025-11-05T23:08:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=597cd767d6ad2cca0d8676888c40cbc5700db1ca'/>
<id>597cd767d6ad2cca0d8676888c40cbc5700db1ca</id>
<content type='text'>
Reverts llvm/llvm-project#166252

Causing buildbot failures on `libc-x86_64-debian-dbg-asan`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#166252

Causing buildbot failures on `libc-x86_64-debian-dbg-asan`.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Return errno from OFD failure paths in fcntl. (#166252)</title>
<updated>2025-11-05T22:35:20+00:00</updated>
<author>
<name>Jackson Stogel</name>
<email>jtstogel@gmail.com</email>
</author>
<published>2025-11-05T22:35:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=81dede888a35281e20b59107a6bf347c23e1c5f6'/>
<id>81dede888a35281e20b59107a6bf347c23e1c5f6</id>
<content type='text'>
This patch also configures fcntl lock tests to run with F_OFD_* command
variants, as all existing lock tests do not exercise process-associated-
or OFD-specific functionality.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch also configures fcntl lock tests to run with F_OFD_* command
variants, as all existing lock tests do not exercise process-associated-
or OFD-specific functionality.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Add printf error handling (with fixes #2) (#166517)</title>
<updated>2025-11-05T21:09:53+00:00</updated>
<author>
<name>Marcell Leleszi</name>
<email>59964679+mleleszi@users.noreply.github.com</email>
</author>
<published>2025-11-05T21:09:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9e2f73fe9052a4fbf382a06e30b2441c6d99fb7e'/>
<id>9e2f73fe9052a4fbf382a06e30b2441c6d99fb7e</id>
<content type='text'>
https://github.com/llvm/llvm-project/issues/159474

Another try of trying to land
https://github.com/llvm/llvm-project/pull/166382
- Fix some leftover tests checking for specific  errnos
- Guard errno checking tests to not run on the GPU

@michaelrj-google</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/llvm/llvm-project/issues/159474

Another try of trying to land
https://github.com/llvm/llvm-project/pull/166382
- Fix some leftover tests checking for specific  errnos
- Guard errno checking tests to not run on the GPU

@michaelrj-google</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Make errno asserts noop on gpu targets (#166606)</title>
<updated>2025-11-05T19:17:13+00:00</updated>
<author>
<name>Marcell Leleszi</name>
<email>59964679+mleleszi@users.noreply.github.com</email>
</author>
<published>2025-11-05T19:17:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3d0a3674d9ae52ed685ce467a48653cc27a2e5eb'/>
<id>3d0a3674d9ae52ed685ce467a48653cc27a2e5eb</id>
<content type='text'>
This patch defines errno unit and integration test asserts as noop on
GPU targets. Checking for errnos is tests has caused build breakages in
previous patches.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch defines errno unit and integration test asserts as noop on
GPU targets. Checking for errnos is tests has caused build breakages in
previous patches.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Migrate wctype_utils to use wchar_t where applicable. (#166234)</title>
<updated>2025-11-05T19:03:25+00:00</updated>
<author>
<name>Alexey Samsonov</name>
<email>vonosmas@gmail.com</email>
</author>
<published>2025-11-05T19:03:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e7f7973899f76773ae6e9a6b1e8c7e9f9cc5cb56'/>
<id>e7f7973899f76773ae6e9a6b1e8c7e9f9cc5cb56</id>
<content type='text'>
This is a counterpart of
https://github.com/llvm/llvm-project/pull/166225 but for wctype_utils
(which are not yet widely used). For now, I'm just changing the types
from wint_t to wchar_t to match the regular ctype_utils change. The next
change may rename most of the functions to match the name of ctype_utils
variants, so that we could be calling them from the templated code
operating on "const char*" and "const wchar_t*" strings, and the right
function signature would be picked up.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a counterpart of
https://github.com/llvm/llvm-project/pull/166225 but for wctype_utils
(which are not yet widely used). For now, I'm just changing the types
from wint_t to wchar_t to match the regular ctype_utils change. The next
change may rename most of the functions to match the name of ctype_utils
variants, so that we could be calling them from the templated code
operating on "const char*" and "const wchar_t*" strings, and the right
function signature would be picked up.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Migrate ctype_utils to use char instead of int where applicable. (#166225)</title>
<updated>2025-11-05T19:02:28+00:00</updated>
<author>
<name>Alexey Samsonov</name>
<email>vonosmas@gmail.com</email>
</author>
<published>2025-11-05T19:02:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=120689e46679c6db37cd9e839ec0721e80a22d4f'/>
<id>120689e46679c6db37cd9e839ec0721e80a22d4f</id>
<content type='text'>
Functions like isalpha / tolower can operate on chars internally. This
allows us to get rid of unnecessary casts and open a way to creating
wchar_t overloads with the same names (e.g. for isalpha), that would
simplify templated code for conversion functions (see
315dfe5865962d8a3d60e21d1fffce5214fe54ef).

Add the int-&gt;char converstion to public entrypoints implementation
instead. We also need to introduce bounds check on the input argument
values - these functions' behavior is unspecified if the argument is
neither EOF nor fits in "unsigned char" range, but the tests we've had
verified that they always return false for small negative values. To
preserve this behavior, cover it explicitly.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Functions like isalpha / tolower can operate on chars internally. This
allows us to get rid of unnecessary casts and open a way to creating
wchar_t overloads with the same names (e.g. for isalpha), that would
simplify templated code for conversion functions (see
315dfe5865962d8a3d60e21d1fffce5214fe54ef).

Add the int-&gt;char converstion to public entrypoints implementation
instead. We also need to introduce bounds check on the input argument
values - these functions' behavior is unspecified if the argument is
neither EOF nor fits in "unsigned char" range, but the tests we've had
verified that they always return false for small negative values. To
preserve this behavior, cover it explicitly.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math] Refactor exp2m1f16 implementation to header-only in src/__support/math folder. (#162019)</title>
<updated>2025-11-05T12:50:40+00:00</updated>
<author>
<name>Muhammad Bassiouni</name>
<email>60100307+bassiounix@users.noreply.github.com</email>
</author>
<published>2025-11-05T12:50:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0d77cba6e165283283431f0d9566d0e0e06e63d7'/>
<id>0d77cba6e165283283431f0d9566d0e0e06e63d7</id>
<content type='text'>
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math] Disable `FEnvSafeTest.cpp` if AArch64 target has no FP support (#166370)</title>
<updated>2025-11-05T11:14:02+00:00</updated>
<author>
<name>Victor Campos</name>
<email>victor.campos@arm.com</email>
</author>
<published>2025-11-05T11:14:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d249e67a6a7c36a2ffcf08839810a8efa4603f18'/>
<id>d249e67a6a7c36a2ffcf08839810a8efa4603f18</id>
<content type='text'>
The `FEnvSafeTest.cpp` test fails on AArch64 soft nofp configurations
because LLVM libc does not provide a floating-point environment in these
configurations.

This patch adds another preprocessor guard on `__ARM_FP` to disable the
test on those.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `FEnvSafeTest.cpp` test fails on AArch64 soft nofp configurations
because LLVM libc does not provide a floating-point environment in these
configurations.

This patch adds another preprocessor guard on `__ARM_FP` to disable the
test on those.</pre>
</div>
</content>
</entry>
</feed>
