Fix Errp missing the current eRR.p path and crashing on NUL-padded files - #1110
Merged
Conversation
Two defects, the second exposed by fixing the first. Path: the glob only matched system/users/service/eRR.p, but current devices store the file at system/users/service/data/eRR.p. All eight registered Android corpora that carry the file use the data path, so the artifact returned zero on every one of them, and on the Android 15 and 16 devices the reporter (Mattia Epifani) tested. Both paths are now matched; the older one is kept for older images. Crash: the file opens with a binary LOGM header, and on some devices its NUL padding is prepended to the first record with no newline. line.strip() does not remove NUL bytes, so the timestamp failed to parse and the unhandled exception killed the whole artifact, losing every row. NUL bytes are now stripped before parsing, and a timestamp that still will not parse keeps its row with the value as stored instead of failing the file. Verified with aleapp.py profile runs on all eight corpora: 24, 50, 35, 52, 44, 18, 175 and 61 rows, no errors; three of them (s20fe_a13, sharon_a14, sharon_a13) crashed before this change and now parse, with every timestamp converting to UTC. Also parsed clean against the reporter's Android 16 and 15 samples (231, 74 and 14 records). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two defects, the second exposed by fixing the first. Mattia Epifani reported the path.
Path: the glob only matched
*/system/users/service/eRR.p, but current devices store the file at.../service/data/eRR.p. All 8 registered Android corpora carrying the file use thedata/path, so the artifact returned zero on every one of them (and on Mattia's Android 15/16 devices). Both paths are now matched (disjoint patterns, no Windows double-count); the older one is kept for older images.Crash: the file opens with a binary
LOGMheader whose NUL padding is, on some devices, prepended to the first record with no newline.line.strip()does not remove NUL bytes, so the timestamp failedstrptimeand the unhandled exception killed the whole artifact, losing every row. NULs are now stripped before parsing, and a timestamp that still won't parse keeps its row (value as stored, no UTC) instead of failing the file.Validation (real aleapp.py profile runs, all 8 corpora)
Zero errors across all eight; on the previously-crashing files every timestamp converts to UTC (0 blank). Also parsed clean against Mattia's Android 16 and 15 samples (231, 74, 14 records). Pylint 10.00, claim-language and validate_sample_data clean. Reporter samples are private and not committed; sample_data records counts from the registered corpora only.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
🤖 Generated with Claude Code