Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
67b110e
[release/6.0] Fixing a possible null reference error in WebSocket def…
github-actions[bot] Dec 23, 2021
3b71fd8
[release/6.0] Don't create multiple large files at the same time (#63…
jozkee Dec 31, 2021
816653e
[release/6.0] Use Ubuntu 18.04 and dotnet-buildtools-prereq docker im…
github-actions[bot] Jan 3, 2022
2282b00
[release/6.0] Add runtime-community.yml pipeline and add s390x job (#…
directhex Jan 3, 2022
6f1e03f
[release/6.0] Do not promote struct locals with holes (#62738)
github-actions[bot] Jan 3, 2022
7d82ac7
[wasm][release/6.0] Reduce number of calls to setTimer (#62705)
maraf Jan 3, 2022
bdd6647
fix issue where HTTP2 connection could be scavenged but not disposed …
github-actions[bot] Jan 3, 2022
45d1f9e
Update dependencies from https://github.com/dotnet/arcade build 20211…
dotnet-maestro[bot] Jan 3, 2022
f86caa5
[release/6.0] Fix build with Clang 13 (#63314)
janvorli Jan 4, 2022
51b6749
[release/6.0] bump sourcebuild leg timeout (#63298)
safern Jan 5, 2022
dc6a86d
Fix bug where we reference the entry #0 in the pinned plug queue (#60…
cshung Jan 6, 2022
4f01ff5
Fix named mutexes on OSX to work between arm64 and emulated x64 proce…
kouvel Jan 6, 2022
b71484c
Unify the FlushProcessWriteBuffers mechanism for macOS arm64 / x64 (#…
github-actions[bot] Jan 6, 2022
898f09a
[release/6.0] Change macOS activatin injection failure handling (#63393)
janvorli Jan 6, 2022
1c2501d
[release/6.0] Fix XXHash for stripe size (#61923)
github-actions[bot] Jan 6, 2022
25d2a1f
[release/6.0] Making user secrets optional by default (#62917)
github-actions[bot] Jan 6, 2022
201673a
[release/6.0] WinHttp: always read HTTP/2 streams to the end (#63346)
github-actions[bot] Jan 7, 2022
73f902f
[release/6.0] Fix setting timestamp on Windows on readonly files (#62…
adamsitnik Jan 7, 2022
8abc8fc
[release/6.0] Undo breaking change in 6.0 in environment variable con…
github-actions[bot] Jan 7, 2022
a8b733b
[release/6.0] Ensure UserSecretsIdAttribute is added to assembly (#63…
eerhardt Jan 7, 2022
d575a6f
[release/6.0] Add explicit null-check for tailcalls to VSD (#62769)
github-actions[bot] Jan 7, 2022
dc56b08
[release/6.0] Port test-only test fixes (#63507)
danmoseley Jan 7, 2022
abe7d08
[release/6.0] Fix System.Object serialization with custom number hand…
github-actions[bot] Jan 8, 2022
039ab90
Fix bugs with generation for ctor param default values (#62798) (#63493)
layomia Jan 8, 2022
5af5538
Suppress warnings about [Obsolete] member usage in JSON src-gen'd cod…
github-actions[bot] Jan 8, 2022
26b0a12
[release/6.0] Fix TimeSpan support in sourcegen (#62191)
github-actions[bot] Jan 8, 2022
a9723f3
Include properties on records for (de)serialization in source-gen (#6…
github-actions[bot] Jan 8, 2022
4d8bebc
[wasm] Backport build improvements, and fixes from #61581 (#62757)
radical Jan 8, 2022
dfcba66
disable tests unstable on Windows 11 (#63527)
github-actions[bot] Jan 8, 2022
a16c322
[release/6.0] Suppress SendPacketsElement_FileStreamMultiPartMixed_Mu…
github-actions[bot] Jan 8, 2022
749c02b
[release/6.0] Fix GENERIC_MATH_FEATURE by making sure we always choos…
safern Jan 10, 2022
7a26492
Fix NETStandard library using JSON source gen (#63520)
ericstj Jan 10, 2022
3f6d8fa
Make delegates unsupported by JsonSerializer (#63514)
github-actions[bot] Jan 10, 2022
04a5836
[release/6.0] 1388 xml serializer assembly load context awareness (#6…
github-actions[bot] Jan 10, 2022
7780d28
Fix custom JsonConverterFactories not working with transitive type/pr…
github-actions[bot] Jan 10, 2022
46d9a58
Merge branch 'release/6.0-maui' into merge/release/6.0-to-release/6.0…
akoeplinger Jan 12, 2022
7f6c36e
Disable GeneratePackageOnBuild
akoeplinger Jan 12, 2022
d24f93e
Update CompatibilitySuppressions.xml for System.Data.Odbc
akoeplinger Jan 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix bug where we reference the entry #0 in the pinned plug queue (#60966
) (#63351)

We reference entry #0 in the pinned plug queue even if there are no pinned plugs at all and thus the pinned plug queue contains left-over data from the mark phase.

The fix is to initialize saved_pinned_plug_index to a value that is invalid as a pinned plug queue index, and only use saved_pinned_plug_index as an index if  is valid.

Co-authored-by: Peter Sollich <[email protected]>
  • Loading branch information
cshung and PeterSolMS authored Jan 6, 2022
commit dc6a86df3acd0ba8b2a358ec5296cea266b531f6
19 changes: 16 additions & 3 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2725,7 +2725,7 @@ alloc_list gc_heap::poh_alloc_list [NUM_POH_ALIST-1];
#ifdef DOUBLY_LINKED_FL
// size we removed with no undo; only for recording purpose
size_t gc_heap::gen2_removed_no_undo = 0;
size_t gc_heap::saved_pinned_plug_index = 0;
size_t gc_heap::saved_pinned_plug_index = INVALID_SAVED_PINNED_PLUG_INDEX;
#endif //DOUBLY_LINKED_FL

#ifdef FEATURE_EVENT_TRACE
Expand Down Expand Up @@ -13903,7 +13903,20 @@ void gc_heap::adjust_limit (uint8_t* start, size_t limit_size, generation* gen)
uint8_t* old_loc = generation_last_free_list_allocated (gen);

// check if old_loc happens to be in a saved plug_and_gap with a pinned plug after it
uint8_t* saved_plug_and_gap = pinned_plug (pinned_plug_of (saved_pinned_plug_index)) - sizeof(plug_and_gap);
uint8_t* saved_plug_and_gap = nullptr;
if (saved_pinned_plug_index != INVALID_SAVED_PINNED_PLUG_INDEX)
{
saved_plug_and_gap = pinned_plug (pinned_plug_of (saved_pinned_plug_index)) - sizeof(plug_and_gap);

dprintf (3333, ("[h%d] sppi: %Id mtos: %Id old_loc: %Ix pp: %Ix(%Id) offs: %Id",
heap_number,
saved_pinned_plug_index,
mark_stack_tos,
old_loc,
pinned_plug (pinned_plug_of (saved_pinned_plug_index)),
pinned_len (pinned_plug_of (saved_pinned_plug_index)),
old_loc - saved_plug_and_gap));
}
size_t offset = old_loc - saved_plug_and_gap;
if (offset < sizeof(gap_reloc_pair))
{
Expand Down Expand Up @@ -27519,7 +27532,7 @@ void gc_heap::plan_phase (int condemned_gen_number)

#ifdef DOUBLY_LINKED_FL
gen2_removed_no_undo = 0;
saved_pinned_plug_index = 0;
saved_pinned_plug_index = INVALID_SAVED_PINNED_PLUG_INDEX;
#endif //DOUBLY_LINKED_FL

while (1)
Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/gc/gcpriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -4496,6 +4496,8 @@ class gc_heap
PER_HEAP
size_t gen2_removed_no_undo;

#define INVALID_SAVED_PINNED_PLUG_INDEX ((size_t)~0)

PER_HEAP
size_t saved_pinned_plug_index;
#endif //DOUBLY_LINKED_FL
Expand Down