-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[libc] Enable wide-read memory operations by default on Linux #154602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-libc Author: Joseph Huber (jhuber6) ChangesSummary: Full diff: https://github.com/llvm/llvm-project/pull/154602.diff 1 Files Affected:
diff --git a/libc/config/linux/config.json b/libc/config/linux/config.json
new file mode 100644
index 0000000000000..30e8b2cdadabe
--- /dev/null
+++ b/libc/config/linux/config.json
@@ -0,0 +1,7 @@
+{
+ "string": {
+ "LIBC_CONF_STRING_UNSAFE_WIDE_READ": {
+ "value": true
+ }
+ }
+}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Seems the AArch builder has some warnings that were never cleaned up. I'll try to fix those in this PR. |
8d8cc11
to
2208ffe
Compare
✅ With the latest revision this PR passed the C/C++ code formatter. |
3fda3ee
to
03d371e
Compare
Summary: This patch changes the linux build to use the wide reads on the memory operations by default. These memory functions will now potentially read outside of the bounds explicitly allowed by the current function. While technically undefined behavior in the standard, plenty of C library implementations do this. it will not cause a segmentation fault on linux as long as you do not cross a page boundary, and because we are only *reading* memory it should not have atomic effects.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/215/builds/3829 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/147/builds/27552 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/171/builds/28812 Here is the relevant piece of the build log for the reference
|
llvm#154602)" This reverts commit 27fc967.
llvm#154602)" This reverts commit 27fc967.
llvm#154602)" This reverts commit 27fc967.
llvm#154602)" This reverts commit 27fc967.
llvm#154602)" This reverts commit 27fc967.
llvm#154602)" This reverts commit 27fc967.
llvm#154602)" This reverts commit 27fc967.
llvm#154602)" This reverts commit 27fc967.
Summary:
This patch changes the linux build to use the wide reads on the memory
operations by default. These memory functions will now potentially read
outside of the bounds explicitly allowed by the current function. While
technically undefined behavior in the standard, plenty of C library
implementations do this. it will not cause a segmentation fault on linux
as long as you do not cross a page boundary, and because we are only
reading memory it should not have atomic effects.