further constrict line parsing of .so files
ClosedPublic

Authored by sitter on Mar 13 2020, 2:29 PM.

Details

Summary

As seen in https://bugs.kde.org/show_bug.cgi?id=417435 the previous fix
for .so detection actually falls flat on the face for most things
other than glib2. The original test here was flawed as libglib-2.0.so.0
has the complete suffix '0.so.0' which matched the original parsing
condition. most libraries however are libfoo.so.0 and for that the suffix
would be 'so.0' which did not match the original condition.

extend the condition to properly cover files without so-version, files with
awkward suffix (such as glib) and files with normal names and normal
versioning.
also extend test case accordingly

CCBUG: 418538

Test Plan

test passes. all lines from 417435 score less than Good

Diff Detail

Repository
R871 DrKonqi
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Mar 13 2020, 2:29 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 13 2020, 2:29 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sitter requested review of this revision.Mar 13 2020, 2:29 PM

Looks sane to me.

ahmadsamir added inline comments.
src/parser/backtraceparsergdb.cpp
75

(Needs rebasing on master).
I'd move this and define "const bool file" in one place.

82

IIUC, QLatin1String is better for string comparisons.

84

startsWith() and contains() have QLatin1String overloads.

sitter added inline comments.Apr 3 2020, 1:55 PM
src/parser/backtraceparsergdb.cpp
75

Alas the code is garbage enough to read, I prefer the way I've written.

sitter updated this revision to Diff 79219.Apr 3 2020, 1:56 PM

use other string

This revision was not accepted when it landed; it landed in state Needs Review.Apr 6 2020, 1:46 PM
This revision was automatically updated to reflect the committed changes.