| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc] Fix undefined behavior for nan functions. (#106468) 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. | 1 年前 | |
[libc] Remove LlvmLibcStackChkFail.Smash test (#125919) 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. | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 1 年前 |