<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libc/src/string/string_utils.h, branch users/nico/python-2</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>Fix string_length function so that it always returns. (#144148)</title>
<updated>2025-06-13T20:07:39+00:00</updated>
<author>
<name>Amy Huang</name>
<email>akhuang@google.com</email>
</author>
<published>2025-06-13T20:07:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c42912b8c96ff1130437e47c163aeb5c1191fe5d'/>
<id>c42912b8c96ff1130437e47c163aeb5c1191fe5d</id>
<content type='text'>
Previously setting LIBC_COPT_STRING_UNSAFE_WIDE_READ would cause a build
error because there is a path in the ifdef that doesn't return anything.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously setting LIBC_COPT_STRING_UNSAFE_WIDE_READ would cause a build
error because there is a path in the ifdef that doesn't return anything.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] clean up string_utils memory functions (#143031)</title>
<updated>2025-06-06T18:16:54+00:00</updated>
<author>
<name>Michael Jones</name>
<email>michaelrj@google.com</email>
</author>
<published>2025-06-06T18:16:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=59f88a8e929b9eff97f2c37f835d9fe70d1dd0c7'/>
<id>59f88a8e929b9eff97f2c37f835d9fe70d1dd0c7</id>
<content type='text'>
The string_utils.h file previously included both memcpy and bzero. There
were no uses of bzero, and only one use of memcpy which was replaced
with __builtin_memcpy.

Also fix strsep which was broken by this change, fix a useless assert of
"sizeof(char) == sizeof(cpp::byte)", and update the bazel.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The string_utils.h file previously included both memcpy and bzero. There
were no uses of bzero, and only one use of memcpy which was replaced
with __builtin_memcpy.

Also fix strsep which was broken by this change, fix a useless assert of
"sizeof(char) == sizeof(cpp::byte)", and update the bazel.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Add `-Wno-sign-conversion` &amp; re-attempt `-Wconversion` (#129811)</title>
<updated>2025-03-10T15:57:09+00:00</updated>
<author>
<name>Vinay Deshmukh</name>
<email>32487576+vinay-deshmukh@users.noreply.github.com</email>
</author>
<published>2025-03-10T15:57:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=257e48371546f75623482071fc39eef4b64fbd88'/>
<id>257e48371546f75623482071fc39eef4b64fbd88</id>
<content type='text'>
Relates to
https://github.com/llvm/llvm-project/issues/119281#issuecomment-2699470459</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Relates to
https://github.com/llvm/llvm-project/issues/119281#issuecomment-2699470459</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[libc]  Enable -Wconversion for tests. (#127523)"</title>
<updated>2025-03-05T21:42:40+00:00</updated>
<author>
<name>Augie Fackler</name>
<email>augie@google.com</email>
</author>
<published>2025-03-05T18:52:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=da61b0ddc5dcc8f1ac64eaddabdbfec5aa23f22b'/>
<id>da61b0ddc5dcc8f1ac64eaddabdbfec5aa23f22b</id>
<content type='text'>
This reverts commit 1e6e845d49a336e9da7ca6c576ec45c0b419b5f6 because it
changed the 1st parameter of adjust() to be unsigned, but libc itself
calls adjust() with a negative argument in align_backward() in
op_generic.h.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 1e6e845d49a336e9da7ca6c576ec45c0b419b5f6 because it
changed the 1st parameter of adjust() to be unsigned, but libc itself
calls adjust() with a negative argument in align_backward() in
op_generic.h.
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc]  Enable -Wconversion for tests. (#127523)</title>
<updated>2025-03-04T15:24:35+00:00</updated>
<author>
<name>Vinay Deshmukh</name>
<email>32487576+vinay-deshmukh@users.noreply.github.com</email>
</author>
<published>2025-03-04T15:24:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1e6e845d49a336e9da7ca6c576ec45c0b419b5f6'/>
<id>1e6e845d49a336e9da7ca6c576ec45c0b419b5f6</id>
<content type='text'>
Relates to: #119281</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Relates to: #119281</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][wchar] implement wcslen (#124150)</title>
<updated>2025-01-23T21:33:04+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>ndesaulniers@google.com</email>
</author>
<published>2025-01-23T21:33:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=631a6e0004e57ca85569b99ea411418627925697'/>
<id>631a6e0004e57ca85569b99ea411418627925697</id>
<content type='text'>
Update string_utils' string_length to work with char* or wchar_t*, so that it
may be reusable when implementing wmemchr, wcspbrk, wcsrchr, wcsstr.

Link: #121183
Link: #124027

Co-authored-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;

---------

Co-authored-by: Tristan Ross &lt;tristan.ross@midstall.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update string_utils' string_length to work with char* or wchar_t*, so that it
may be reusable when implementing wmemchr, wcspbrk, wcsrchr, wcsstr.

Link: #121183
Link: #124027

Co-authored-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;

---------

Co-authored-by: Tristan Ross &lt;tristan.ross@midstall.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typo "intead"</title>
<updated>2024-11-21T14:48:38+00:00</updated>
<author>
<name>Jay Foad</name>
<email>jay.foad@amd.com</email>
</author>
<published>2024-11-21T14:48:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d6fc7d3ab186fee1c95c00992206e0914cb25f42'/>
<id>d6fc7d3ab186fee1c95c00992206e0914cb25f42</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] fix behavior of strrchr(x, '\0') (#112620)</title>
<updated>2024-10-30T22:08:03+00:00</updated>
<author>
<name>George Burgess IV</name>
<email>george.burgess.iv@gmail.com</email>
</author>
<published>2024-10-30T22:08:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=50c44478fe3f680374edf1363d2a3617b8ff2a0b'/>
<id>50c44478fe3f680374edf1363d2a3617b8ff2a0b</id>
<content type='text'>
`strrchr("foo", '\0')` is defined to point to the end of `foo`, rather
than returning NULL. This wasn't caught by tests, since llvm-libc's
`ASSERT_STREQ(nullptr, "");` is not an assertion error.

While I'm here, refactor the test slightly to check for NULL more
specifically. I considered adding fancier `ASSERT`s (and changing the
semantics of `ASSERT_STREQ`), but opted for a more local fix by fair
dice roll.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`strrchr("foo", '\0')` is defined to point to the end of `foo`, rather
than returning NULL. This wasn't caught by tests, since llvm-libc's
`ASSERT_STREQ(nullptr, "");` is not an assertion error.

While I'm here, refactor the test slightly to check for NULL more
specifically. I considered adding fancier `ASSERT`s (and changing the
semantics of `ASSERT_STREQ`), but opted for a more local fix by fair
dice roll.</pre>
</div>
</content>
</entry>
<entry>
<title>libc: strlcpy/strlcat shouldn't bzero the rest of `buf` (#114259)</title>
<updated>2024-10-30T19:28:32+00:00</updated>
<author>
<name>George Burgess IV</name>
<email>george.burgess.iv@gmail.com</email>
</author>
<published>2024-10-30T19:28:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b03c8c4fdda6e58cb1afe3aa90bf9f2df08a7970'/>
<id>b03c8c4fdda6e58cb1afe3aa90bf9f2df08a7970</id>
<content type='text'>
When running Bionic's testsuite over llvm-libc, tests broke because
e.g.,

```
const char *str = "abc";
char buf[7]{"111111"};
strlcpy(buf, str, 7);
ASSERT_EQ(buf, {'1', '1', '1', '\0', '\0', '\0', '\0'});
```

On my machine (Debian w/ glibc and clang-16), a `printf` loop over `buf`
gets unrolled into a series of const `printf` at compile-time:
```
printf("%d\n", '1');
printf("%d\n", '1');
printf("%d\n", '1');
printf("%d\n", 0);
printf("%d\n", '1');
printf("%d\n", '1');
printf("%d\n", 0);
```

Seems best to match existing precedent here.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running Bionic's testsuite over llvm-libc, tests broke because
e.g.,

```
const char *str = "abc";
char buf[7]{"111111"};
strlcpy(buf, str, 7);
ASSERT_EQ(buf, {'1', '1', '1', '\0', '\0', '\0', '\0'});
```

On my machine (Debian w/ glibc and clang-16), a `printf` loop over `buf`
gets unrolled into a series of const `printf` at compile-time:
```
printf("%d\n", '1');
printf("%d\n", '1');
printf("%d\n", '1');
printf("%d\n", 0);
printf("%d\n", '1');
printf("%d\n", '1');
printf("%d\n", 0);
```

Seems best to match existing precedent here.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)</title>
<updated>2024-07-12T16:28:41+00:00</updated>
<author>
<name>Petr Hosek</name>
<email>phosek@google.com</email>
</author>
<published>2024-07-12T16:28:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5ff3ff33ff930e4ec49da7910612d8a41eb068cb'/>
<id>5ff3ff33ff930e4ec49da7910612d8a41eb068cb</id>
<content type='text'>
This is a part of #97655.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a part of #97655.</pre>
</div>
</content>
</entry>
</feed>
