Skip to content

Fix crash in PerformanceEntrySorter comparator (#56388) - #56388

Closed
Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D98674156
Closed

Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D98674156

Conversation

@Abbondanzo

@Abbondanzo Abbondanzo commented Apr 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Fixed a SIGSEGV crash in the Performance API that occurred when sorting performance entries. The crash was caused by the PerformanceEntrySorter comparator missing the const qualifier on its operator() method.

The PerformanceEntrySorter::operator() was not marked as const, which violates the requirements for comparators used with std::stable_sort. This caused undefined behavior and crashes on Android when sorting performance entries.

Added the const qualifier to PerformanceEntrySorter::operator()() to ensure it's properly const-qualified for use with STL sorting algorithms.

Changelog: [General][Fixed] - Fix crash in Performance API when sorting entries

Reviewed By: rubennorte

Differential Revision: D98674156

@meta-codesync

meta-codesync Bot commented Apr 8, 2026

Copy link
Copy Markdown

@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D98674156.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 8, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Apr 8, 2026
@meta-codesync meta-codesync Bot changed the title Fix crash in PerformanceEntrySorter comparator Fix crash in PerformanceEntrySorter comparator (#56388) Apr 9, 2026
Summary:
Pull Request resolved: #56388

Fixed a SIGSEGV crash in the Performance API that occurred when sorting performance entries. The crash was caused by the PerformanceEntrySorter comparator missing the const qualifier on its operator() method.

The PerformanceEntrySorter::operator() was not marked as const, which violates the requirements for comparators used with std::stable_sort. This caused undefined behavior and crashes on Android when sorting performance entries.

Added the const qualifier to PerformanceEntrySorter::operator()() to ensure it's properly const-qualified for use with STL sorting algorithms.

Changelog: [General][Fixed] - Fix crash in Performance API when sorting entries

Reviewed By: rubennorte

Differential Revision: D98674156
@meta-codesync meta-codesync Bot closed this in 81c9968 Apr 9, 2026
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @Abbondanzo in 81c9968

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Apr 9, 2026
@Abbondanzo
Abbondanzo deleted the export-D98674156 branch April 9, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants