Skip to content

Fix last issue with GC bridge comparison and enable all tests #115049

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

Merged
merged 3 commits into from
Apr 26, 2025
Merged
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions src/mono/mono/metadata/sgen-new-bridge.c
Original file line number Diff line number Diff line change
@@ -676,6 +676,15 @@ processing_stw_step (void)
dyn_array_ptr_init (&dfs_stack);
dyn_array_int_init (&merge_array);

/*
Overflow collections can call processing_stw_step twice. If that happens we have to reset
the hash table to the initial state. The previously processed data are no longer valid and
we get a new set of of registered bridges.
*/
if (sgen_hash_table_num_entries(&hash_table) != 0) {
free_data();
}

current_time = 0;
/*
First we insert all bridges into the hash table and then we do dfs1.
8 changes: 4 additions & 4 deletions src/tests/GC/Features/Bridge/Bridge.cs
Original file line number Diff line number Diff line change
@@ -405,9 +405,9 @@ static void SetupFragmentation<TBridge, TNonBridge>()

public static int Main(string[] args)
{
// TestLinkedList(); // Crashes, but only in this multithreaded variant, also only on osx for me
RunGraphTest(SetupFragmentation<Bridge14, NonBridge14>); // This passes but the following crashes ??
// RunGraphTest(SetupFragmentation<Bridge, NonBridge>);
TestLinkedList();
RunGraphTest(SetupFragmentation<Bridge14, NonBridge14>);
RunGraphTest(SetupFragmentation<Bridge, NonBridge>);
RunGraphTest(SetupLinks);
RunGraphTest(SetupLinkedFan);
RunGraphTest(SetupInverseFan);
@@ -416,7 +416,7 @@ public static int Main(string[] args)
RunGraphTest(SetupSelfLinks);
RunGraphTest(NestedCycles);
RunGraphTest(FauxHeavyNodeWithCycles);
// RunGraphTest(Spider); // Crashes
RunGraphTest(Spider);
return 100;
}
}
Loading
Oops, something went wrong.