Skip to content

Correct crash classification for MTE SEGV traces#14

Open
dhavalts1989 wants to merge 1 commit intoittiam-systems:masterfrom
dhavalts1989:mte_parsing_fix
Open

Correct crash classification for MTE SEGV traces#14
dhavalts1989 wants to merge 1 commit intoittiam-systems:masterfrom
dhavalts1989:mte_parsing_fix

Conversation

@dhavalts1989
Copy link
Collaborator

Before Fix

MTE crashes were incorrectly reported as UNKNOWN. The existing ANDROID_SEGV_REGEX matches MTE SEGV traces but sets new_type=UNKNOWN. The fix checks for SEGV_MTESERR in the trace line and updates crash_type accordingly. Verified locally, test cases are now filed with the correct SEGV_MTESERR crash type.

After Fix

@aditya-wazir aditya-wazir self-requested a review October 10, 2025 18:06
Copy link
Collaborator

@aditya-wazir aditya-wazir left a comment

Choose a reason for hiding this comment

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

Please resolve

Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. add comment explaining logic
  2. Need for else part? How will the generated test case looks for else part? Should write test for else part
  3. What all kind of crashes will this parsing cover for MTE devices. Add that too
  4. See if stack trace for other issues is also being processed correctly, if not, lets update that as next commit or PR
  5. Commit message for the PR that we will push to Google/clusterfuzz will not require ss , need to create a commit message explaining change and the basis we are using to parse these crashes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi Aditya,

  1. The updated commit includes a comment clearly explaining the logic for parsing MTE SEGV crashes.
  2. The else part was not necessary and has been removed in this commit, as the regex match is expected whenever 'SEGV_MTESERR' is present.
  3. This parsing specifically covers MTE SEGV crashes only. This is mentioned both in the updated code comment and the commit message.
  4. This change does not affect the parsing of other stack traces. It only processes memory-related errors for MTE devices by checking 'SEGV_MTESERR', which is unique to MTE SEGV crashes.
  5. The commit message has been updated to explain the logic and the rationale for parsing MTE SEGV crashes.

Please review the latest commit.

Copy link
Collaborator

@aditya-wazir aditya-wazir left a comment

Choose a reason for hiding this comment

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

variable shouldn't be named 'm'. Please rectify

Previously, MTE crashes were incorrectly reported as UNKNOWN. The existing
ANDROID_SEGV_REGEX matches MTE SEGV traces but sets new_type=UNKNOWN, causing
misclassification. This change adds an explicit check for 'SEGV_MTESERR' in
the crash trace line and updates crash_type to "Tag-mismatch" with the
correct access type (e.g., "(read)" or "(write)").

The update ensures that crashes involving MTE faults are parsed correctly,
filed under the appropriate crash type, and test cases now verify the
correct behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants