Skip to content

Misc fixes for R2#8219

Merged
emesare merged 7 commits into
devfrom
test_misc_fixes_0
May 28, 2026
Merged

Misc fixes for R2#8219
emesare merged 7 commits into
devfrom
test_misc_fixes_0

Conversation

@emesare
Copy link
Copy Markdown
Member

@emesare emesare commented May 27, 2026

emesare added 2 commits May 27, 2026 13:48
This mirrors the fix that was performed on the x86 platform
Copy link
Copy Markdown

Copilot AI left a comment

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 bundles several stability and hardening fixes across loaders, platforms, plugins, and language parsers to address race conditions and malformed-input crashes (notably for PE exception directories, WARP sidebar callbacks, and Objective-C metadata parsing).

Changes:

  • Add additional validation/fast-fail behavior for malformed inputs (PE exception directory; Objective-C protocol/ivar/CFString parsing).
  • Address UI/plugin lifetime and threading hazards in the WARP sidebar update callbacks.
  • Prevent concurrent initialization races in the Windows x64 platform view init path.

Reviewed changes

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

Show a summary per file
File Description
view/pe/peview.cpp Adds a fast-fail check intended to prevent oversized/malformed exception directory tables.
rust/src/architecture.rs Pure formatting change for readability (no behavior change).
plugins/warp/ui/plugin.cpp Changes sidebar update scheduling to use Qt’s main-thread invocation mechanism.
platform/windows/platform_windows.cpp Adds a mutex to prevent concurrent m_teb initialization in x64 BinaryViewInit.
objectivec/objc.cpp Adds bounds checks to skip clearly-malformed Objective-C metadata counts/sizes to avoid crashes.
Comments suppressed due to low confidence (1)

plugins/warp/ui/plugin.cpp:186

  • This callback is registered in WarpFetcher, which copies the callback list and then executes callbacks without holding the mutex (see WarpFetcher::ExecuteCompletionCallback). As a result, RemoveCompletionCallback in the destructor does not guarantee this lambda won’t run after the widget is destroyed. Capturing raw this here can still lead to UAF. Prefer capturing a QPointer<WarpSidebarWidget> (or similar weak reference) and checking it before calling invokeMethod/accessing members.
	m_fetcher = WarpFetcher::Global();
	m_callbackId = m_fetcher->AddCompletionCallback([this]() {
		QMetaObject::invokeMethod(this, [this]() {
			// Instead of doing a full update after fetching, we only want to make sure the current function has
			// up-to-date matches, since the other two tabs (all matches, container list) do not get populated with
			// additional information or manage their own updates (e.g. container source list).
			m_currentFunctionWidget->UpdateMatches();
		});
		return KeepCallback;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread view/pe/peview.cpp Outdated
Comment thread objectivec/objc.cpp
@emesare emesare force-pushed the test_misc_fixes_0 branch 2 times, most recently from 7906daf to 4683004 Compare May 27, 2026 20:39
Copy link
Copy Markdown
Member

@plafosse plafosse left a comment

Choose a reason for hiding this comment

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

Did review in person and approved given the changes we discussed (regarding integer overflow.)

@emesare emesare force-pushed the test_misc_fixes_0 branch from 4683004 to 37fd650 Compare May 28, 2026 18:07
@emesare emesare merged commit b24fcc8 into dev May 28, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash due to null dereference below WarpFunctionInfoWidget::UpdateInfo

3 participants