') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); Revert "Fix up hijacking on arm32 (preserve async continuation register)" by MichalStrehovsky · Pull Request #123474 · dotnet/runtime · GitHub
Skip to content

Revert "Fix up hijacking on arm32 (preserve async continuation register)" - #123474

Merged
MichalStrehovsky merged 1 commit into
mainfrom
revert-123057-hijacking-arm32
Jan 22, 2026
Merged

Revert "Fix up hijacking on arm32 (preserve async continuation register)"#123474
MichalStrehovsky merged 1 commit into
mainfrom
revert-123057-hijacking-arm32

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

Outerloop runs are consistently crashing on ARM32 and this PR is in the commit range when it started. Validating a theory.

Reverts #123057

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.

@MichalStrehovsky

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-nativeaot-outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts PR #123057 which attempted to preserve the async continuation register (r2) during ARM32 hijacking. The revert is being done because outerloop runs have been consistently crashing on ARM32, and the original PR is suspected to be the cause.

Changes:

  • Reverts stack frame modifications in GC probe macros to not save register r2
  • Reverts register usage in hijack fixup to return thread pointer in r2 instead of r3
  • Removes the PTFF_SAVE_R2 flag definition

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

FileDescription
src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm.incRemoves PTFF_SAVE_R2 flag definition and associated comment
src/coreclr/nativeaot/Runtime/arm/GcProbe.SReverts stack frame size, register save/restore operations, and register usage in GC hijacking macros to pre-PR #123057 state

@jkotasjkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it makes NAOT outer loop green...

@MichalStrehovsky

Copy link
Copy Markdown
MemberAuthor

If it makes NAOT outer loop green...

It makes it greener. There are still things to be desired, I have more PRs in flight.

But this was the first green linux-arm Release NativeAOT_Libs leg in a week.

Runs before that consistently have multiple bad crashes (e.g. last two):

https://dev.azure.com/dnceng-public/public/_build/results?buildId=1261771&view=logs&j=a8f24b3c-c71a-5a83-5031-ad8ed12efa6f&t=a3a9b0bf-91c4-5189-59f6-f12a5762434d
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1260701&view=logs&s=6884a131-87da-5381-61f3-d7acc3b91d76&j=a8f24b3c-c71a-5a83-5031-ad8ed12efa6f

Cc @eduardo-vp I'm reverting the ARM32 hijacking change, this will need more work unfortunately.

@MichalStrehovsky

Copy link
Copy Markdown
MemberAuthor

/ba-g native AOT outerloop is on the floor

@MichalStrehovsky
MichalStrehovsky merged commit a029187 into mainJan 22, 2026
117 of 131 checks passed
@MichalStrehovsky
MichalStrehovsky deleted the revert-123057-hijacking-arm32 branch January 22, 2026 12:56
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Feb 22, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@MichalStrehovsky@jkotas