<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libc/test/src/compiler, 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>[libc] Remove LlvmLibcStackChkFail.Smash test (#125919)</title>
<updated>2025-02-05T20:34:19+00:00</updated>
<author>
<name>Roland McGrath</name>
<email>mcgrathr@google.com</email>
</author>
<published>2025-02-05T20:34:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4eab2194872d54e2d4496135a277b1610ff33ead'/>
<id>4eab2194872d54e2d4496135a277b1610ff33ead</id>
<content type='text'>
This test was problematic, and also unnecessary.  It's not really
a test of the libc functionality or ABI.  That's already covered
by the LlvmLibcStackChkFail.Death test.  The Smash test was in
fact just testing that the compiler produces the call in the
expected situation.  That's a compiler test, not a libc test.

It's not really feasible to make a test like this both reliable
and safe.  Since it's not something libc needs to test, it's not
worth trying.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test was problematic, and also unnecessary.  It's not really
a test of the libc functionality or ABI.  That's already covered
by the LlvmLibcStackChkFail.Death test.  The Smash test was in
fact just testing that the compiler produces the call in the
expected situation.  That's a compiler test, not a libc test.

It's not really feasible to make a test like this both reliable
and safe.  Since it's not something libc needs to test, it's not
worth trying.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[libc] Make LlvmLibcStackChkFail.Smash test compatible with asan, hwasan" (#125785)</title>
<updated>2025-02-05T00:06:21+00:00</updated>
<author>
<name>Roland McGrath</name>
<email>mcgrathr@google.com</email>
</author>
<published>2025-02-05T00:06:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=66ce716676c49d93d8a6c2ed557f182befaa4ded'/>
<id>66ce716676c49d93d8a6c2ed557f182befaa4ded</id>
<content type='text'>
Reverts llvm/llvm-project#125763

This causes failures in asan. More thought is needed.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#125763

This causes failures in asan. More thought is needed.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Make LlvmLibcStackChkFail.Smash test compatible with asan, hwasan (#125763)</title>
<updated>2025-02-04T21:42:23+00:00</updated>
<author>
<name>Roland McGrath</name>
<email>mcgrathr@google.com</email>
</author>
<published>2025-02-04T21:42:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1e7624ca4f3c9df14242b532eeb9497c67bc4074'/>
<id>1e7624ca4f3c9df14242b532eeb9497c67bc4074</id>
<content type='text'>
Previously this test was entirely disabled under asan, but not
hwasan.  Instead of disabling the test, make the test compatible
with both asan and hwasan by disabling sanitizers only on the
subroutine that does the stack-smashing.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously this test was entirely disabled under asan, but not
hwasan.  Instead of disabling the test, make the test compatible
with both asan and hwasan by disabling sanitizers only on the
subroutine that does the stack-smashing.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix undefined behavior for nan functions. (#106468)</title>
<updated>2024-09-11T18:13:31+00:00</updated>
<author>
<name>lntue</name>
<email>35648136+lntue@users.noreply.github.com</email>
</author>
<published>2024-09-11T18:13:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1896ee38898a73ea9c2894e848884c8999884ab1'/>
<id>1896ee38898a73ea9c2894e848884c8999884ab1</id>
<content type='text'>
Currently the nan* functions use nullptr dereferencing to crash with
SIGSEGV if the input is nullptr. Both `nan(nullptr)` and `nullptr`
dereferencing are undefined behaviors according to the C standard.
Employing `nullptr` dereference in the `nan` function implementation is
ok if users only linked against the pre-built library, but it might be
completely removed by the compilers' optimizations if it is built from
source together with the users' code.

See for instance:  https://godbolt.org/z/fd8KcM9bx

This PR uses volatile load to prevent the undefined behavior if libc is
built without sanitizers, and leave the current undefined behavior if
libc is built with sanitizers, so that the undefined behavior can be
caught for users' codes.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the nan* functions use nullptr dereferencing to crash with
SIGSEGV if the input is nullptr. Both `nan(nullptr)` and `nullptr`
dereferencing are undefined behaviors according to the C standard.
Employing `nullptr` dereference in the `nan` function implementation is
ok if users only linked against the pre-built library, but it might be
completely removed by the compilers' optimizations if it is built from
source together with the users' code.

See for instance:  https://godbolt.org/z/fd8KcM9bx

This PR uses volatile load to prevent the undefined behavior if libc is
built without sanitizers, and leave the current undefined behavior if
libc is built with sanitizers, so that the undefined behavior can be
caught for users' codes.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Revert https://github.com/llvm/llvm-project/pull/83199 since it broke Fuchsia. (#83374)</title>
<updated>2024-02-29T19:43:53+00:00</updated>
<author>
<name>lntue</name>
<email>35648136+lntue@users.noreply.github.com</email>
</author>
<published>2024-02-29T19:43:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=73aab2f69773324ef0250f093bd4d782beee921a'/>
<id>73aab2f69773324ef0250f093bd4d782beee921a</id>
<content type='text'>
With some header fix forward for GPU builds.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With some header fix forward for GPU builds.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] try fixing LlvmLibcStackChkFail.Smash a third time (#75988)</title>
<updated>2023-12-20T00:23:29+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>nickdesaulniers@users.noreply.github.com</email>
</author>
<published>2023-12-20T00:23:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=22764918b5c1496970ab6bb1547535c554a06347'/>
<id>22764918b5c1496970ab6bb1547535c554a06347</id>
<content type='text'>
Build bots are failing in post submit. Unclear why but can't reproduce
locally.
Disable this test for asan for now.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Build bots are failing in post submit. Unclear why but can't reproduce
locally.
Disable this test for asan for now.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] try fixing LlvmLibcStackChkFail.Smash again (#75967)</title>
<updated>2023-12-19T21:32:52+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>nickdesaulniers@users.noreply.github.com</email>
</author>
<published>2023-12-19T21:32:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b3d024c6737adb87e83193de88af04ec74ddf3ea'/>
<id>b3d024c6737adb87e83193de88af04ec74ddf3ea</id>
<content type='text'>
Looks like adding attributes to lambdas wasn't added to ISO C++ until
C++23.
Forget lambdas and just use a static function.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Looks like adding attributes to lambdas wasn't added to ISO C++ until
C++23.
Forget lambdas and just use a static function.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] disable asan for LlvmLibcStackChkFail.Smash (#75966)</title>
<updated>2023-12-19T20:39:27+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>nickdesaulniers@users.noreply.github.com</email>
</author>
<published>2023-12-19T20:39:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=edbd034248bcec94863199de7c7dcfd3347284a9'/>
<id>edbd034248bcec94863199de7c7dcfd3347284a9</id>
<content type='text'>
Otherwise for ASAN configured runs of the test, the test will fail due
to the
sanitizer rather than via SIGABRT.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise for ASAN configured runs of the test, the test will fail due
to the
sanitizer rather than via SIGABRT.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] __stack_chk_fail post submit test failures (#75962)</title>
<updated>2023-12-19T19:59:42+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>nickdesaulniers@users.noreply.github.com</email>
</author>
<published>2023-12-19T19:59:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=24d44ff473c73891a4085c2cd777108d9d7bb50a'/>
<id>24d44ff473c73891a4085c2cd777108d9d7bb50a</id>
<content type='text'>
Use a size smaller than the smallest supported page size so that we
don't
clobber over any guard pages, which may result in a segfault before
__stack_chk_fail can be called.

Also, move __stack_chk_fail outside of our namespace.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use a size smaller than the smallest supported page size so that we
don't
clobber over any guard pages, which may result in a segfault before
__stack_chk_fail can be called.

Also, move __stack_chk_fail outside of our namespace.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] move __stack_chk_fail to src/ from startup/ (#75863)</title>
<updated>2023-12-19T19:05:12+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>nickdesaulniers@users.noreply.github.com</email>
</author>
<published>2023-12-19T19:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=315a5cce89d8f15da5c47d85abbc8155b9c0f0b0'/>
<id>315a5cce89d8f15da5c47d85abbc8155b9c0f0b0</id>
<content type='text'>
__stack_chk_fail should be provided by libc.a, not startup files.

Add __stack_chk_fail to existing linux and arm entrypoints. On Windows
(when
not targeting MinGW), it seems that the corresponding function
identifier is
__security_check_cookie, so no entrypoint is added for Windows.
Baremetal
targets also ought to be compileable with `-fstack-protector*`

There is no common header for this prototype, since calls to
__stack_chk_fail
are meant to be inserted by the compiler upon function return when
compiled
`-fstack-protector*`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__stack_chk_fail should be provided by libc.a, not startup files.

Add __stack_chk_fail to existing linux and arm entrypoints. On Windows
(when
not targeting MinGW), it seems that the corresponding function
identifier is
__security_check_cookie, so no entrypoint is added for Windows.
Baremetal
targets also ought to be compileable with `-fstack-protector*`

There is no common header for this prototype, since calls to
__stack_chk_fail
are meant to be inserted by the compiler upon function return when
compiled
`-fstack-protector*`.</pre>
</div>
</content>
</entry>
</feed>
