projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cd67e1
)
There is no need to zero static data, and it is racy (mono/mono#15699)
author
Jay Krell
<jaykrell@microsoft.com>
Wed, 7 Aug 2019 14:40:57 +0000
(07:40 -0700)
committer
Aleksey Kliger (λgeek)
<alklig@microsoft.com>
Wed, 7 Aug 2019 14:40:57 +0000
(10:40 -0400)
if there are multiple threads calling (unlikely).
This zeroing was made moot by mono/mono@
470354fa817716739615ff0c6cfefca42ec8b385
January 2019.
Commit migrated from https://github.com/mono/mono/commit/
e8d28feb1e7a8cb0820704aee66410f4ae13c252
src/mono/mono/utils/mono-merp.c
patch
|
blob
|
history
diff --git
a/src/mono/mono/utils/mono-merp.c
b/src/mono/mono/utils/mono-merp.c
index
d3e977e
..
c8ba887
100644
(file)
--- a/
src/mono/mono/utils/mono-merp.c
+++ b/
src/mono/mono/utils/mono-merp.c
@@
-49,7
+49,9
@@
os_version_string (void)
static const char *version_string;
if (!version_string) {
- memset (&name, 0, sizeof (name)); // WSL does not always nul terminate.
+ // WSL does not always nul terminate. WSL was fixed February 2018.
+ // Restore memset if variable made non-static.
+ //memset (&name, 0, sizeof (name));
if (uname (&name) >= 0)
version_string = name.release;