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:
0f44e44
)
Fix misplaced volatile (dotnet/coreclr#18115)
author
Jan Kotas
<jkotas@microsoft.com>
Fri, 25 May 2018 01:18:56 +0000
(18:18 -0700)
committer
GitHub
<noreply@github.com>
Fri, 25 May 2018 01:18:56 +0000
(18:18 -0700)
Fixes dotnet/coreclr#13015
Commit migrated from https://github.com/dotnet/coreclr/commit/
5fe6e952f7a9f60ae190a746f2446d255d0e5bea
src/coreclr/src/vm/object.cpp
patch
|
blob
|
history
diff --git
a/src/coreclr/src/vm/object.cpp
b/src/coreclr/src/vm/object.cpp
index
bb7c8e7
..
a0427cd
100644
(file)
--- a/
src/coreclr/src/vm/object.cpp
+++ b/
src/coreclr/src/vm/object.cpp
@@
-1658,9
+1658,9
@@
void __fastcall ZeroMemoryInGCHeap(void* mem, size_t size)
*memBytes++ = 0;
// now write pointer sized pieces
- // volatile ensures that this doesn't get optimized back into a memset call
(see #12207)
+ // volatile ensures that this doesn't get optimized back into a memset call
size_t nPtrs = (endBytes - memBytes) / sizeof(PTR_PTR_VOID);
-
volatile PTR_PTR_VOID
memPtr = (PTR_PTR_VOID) memBytes;
+
PTR_VOID volatile *
memPtr = (PTR_PTR_VOID) memBytes;
for (size_t i = 0; i < nPtrs; i++)
*memPtr++ = 0;