public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/grte] More aggressively prevent a buffer from being optimized out
@ 2021-08-28 0:30 Fangrui Song
0 siblings, 0 replies; 4+ messages in thread
From: Fangrui Song @ 2021-08-28 0:30 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f9f19b687265f79f666469dd24e9572c8cb7c580
commit f9f19b687265f79f666469dd24e9572c8cb7c580
Author: Shu-Chun Weng <scw@google.com>
Date: Mon May 3 16:12:44 2021 -0700
More aggressively prevent a buffer from being optimized out
The volatile global variable was first introduced in e86f9654c. I have
noticed the compiler still optimizing the buffer out on AArch64
presumably because the assignment is after all other observable
behaviors so it's still valid to eliminate it.
Diff:
---
string/tst-xbzero-opt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/string/tst-xbzero-opt.c b/string/tst-xbzero-opt.c
index e9c411b2ef..4f16c4d678 100644
--- a/string/tst-xbzero-opt.c
+++ b/string/tst-xbzero-opt.c
@@ -119,17 +119,17 @@ static void
setup_no_clear (void)
{
unsigned char buf[TEST_BUFFER_SIZE];
- prepare_test_buffer (buf);
vol_glob = buf;
+ prepare_test_buffer (buf);
}
static void
setup_ordinary_clear (void)
{
unsigned char buf[TEST_BUFFER_SIZE];
+ vol_glob = buf;
prepare_test_buffer (buf);
memset (buf, 0, TEST_BUFFER_SIZE);
- vol_glob = buf;
}
static void
^ permalink raw reply [flat|nested] 4+ messages in thread
* [glibc/maskray/grte] More aggressively prevent a buffer from being optimized out
@ 2021-08-28 0:34 Fangrui Song
0 siblings, 0 replies; 4+ messages in thread
From: Fangrui Song @ 2021-08-28 0:34 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=df64d523104d05a17c9ef66345077154588a5424
commit df64d523104d05a17c9ef66345077154588a5424
Author: Shu-Chun Weng <scw@google.com>
Date: Mon May 3 16:12:44 2021 -0700
More aggressively prevent a buffer from being optimized out
The volatile global variable was first introduced in e86f9654c. I have
noticed the compiler still optimizing the buffer out on AArch64
presumably because the assignment is after all other observable
behaviors so it's still valid to eliminate it.
Diff:
---
string/tst-xbzero-opt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/string/tst-xbzero-opt.c b/string/tst-xbzero-opt.c
index e9c411b2ef..4f16c4d678 100644
--- a/string/tst-xbzero-opt.c
+++ b/string/tst-xbzero-opt.c
@@ -119,17 +119,17 @@ static void
setup_no_clear (void)
{
unsigned char buf[TEST_BUFFER_SIZE];
- prepare_test_buffer (buf);
vol_glob = buf;
+ prepare_test_buffer (buf);
}
static void
setup_ordinary_clear (void)
{
unsigned char buf[TEST_BUFFER_SIZE];
+ vol_glob = buf;
prepare_test_buffer (buf);
memset (buf, 0, TEST_BUFFER_SIZE);
- vol_glob = buf;
}
static void
^ permalink raw reply [flat|nested] 4+ messages in thread
* [glibc/maskray/grte] More aggressively prevent a buffer from being optimized out
@ 2021-08-27 23:49 Fangrui Song
0 siblings, 0 replies; 4+ messages in thread
From: Fangrui Song @ 2021-08-27 23:49 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ca72798379e2f8903265d418d7740fdf0a9c7089
commit ca72798379e2f8903265d418d7740fdf0a9c7089
Author: Shu-Chun Weng <scw@google.com>
Date: Mon May 3 16:12:44 2021 -0700
More aggressively prevent a buffer from being optimized out
The volatile global variable was first introduced in e86f9654c. I have
noticed the compiler still optimizing the buffer out on AArch64
presumably because the assignment is after all other observable
behaviors so it's still valid to eliminate it.
Diff:
---
string/tst-xbzero-opt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/string/tst-xbzero-opt.c b/string/tst-xbzero-opt.c
index e9c411b2ef..4f16c4d678 100644
--- a/string/tst-xbzero-opt.c
+++ b/string/tst-xbzero-opt.c
@@ -119,17 +119,17 @@ static void
setup_no_clear (void)
{
unsigned char buf[TEST_BUFFER_SIZE];
- prepare_test_buffer (buf);
vol_glob = buf;
+ prepare_test_buffer (buf);
}
static void
setup_ordinary_clear (void)
{
unsigned char buf[TEST_BUFFER_SIZE];
+ vol_glob = buf;
prepare_test_buffer (buf);
memset (buf, 0, TEST_BUFFER_SIZE);
- vol_glob = buf;
}
static void
^ permalink raw reply [flat|nested] 4+ messages in thread
* [glibc/maskray/grte] More aggressively prevent a buffer from being optimized out
@ 2021-08-27 23:47 Fangrui Song
0 siblings, 0 replies; 4+ messages in thread
From: Fangrui Song @ 2021-08-27 23:47 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f5babc0f3ab0ba90d5a87c3b86f38e06ff3a60f7
commit f5babc0f3ab0ba90d5a87c3b86f38e06ff3a60f7
Author: Shu-Chun Weng <scw@google.com>
Date: Mon May 3 16:12:44 2021 -0700
More aggressively prevent a buffer from being optimized out
The volatile global variable was first introduced in e86f9654c. I have
noticed the compiler still optimizing the buffer out on AArch64
presumably because the assignment is after all other observable
behaviors so it's still valid to eliminate it.
Diff:
---
string/tst-xbzero-opt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/string/tst-xbzero-opt.c b/string/tst-xbzero-opt.c
index e9c411b2ef..4f16c4d678 100644
--- a/string/tst-xbzero-opt.c
+++ b/string/tst-xbzero-opt.c
@@ -119,17 +119,17 @@ static void
setup_no_clear (void)
{
unsigned char buf[TEST_BUFFER_SIZE];
- prepare_test_buffer (buf);
vol_glob = buf;
+ prepare_test_buffer (buf);
}
static void
setup_ordinary_clear (void)
{
unsigned char buf[TEST_BUFFER_SIZE];
+ vol_glob = buf;
prepare_test_buffer (buf);
memset (buf, 0, TEST_BUFFER_SIZE);
- vol_glob = buf;
}
static void
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-28 0:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-28 0:30 [glibc/maskray/grte] More aggressively prevent a buffer from being optimized out Fangrui Song
-- strict thread matches above, loose matches on Subject: below --
2021-08-28 0:34 Fangrui Song
2021-08-27 23:49 Fangrui Song
2021-08-27 23:47 Fangrui Song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).