Skip to content

pmap: Fix detail parsing on long mapping lines

Emanuele Aina requested to merge (removed):master into master

If the mapping descriptor is longer than 128 chars, the last parsed character won't be a newline even if the current buffer contains it a bit further than that. The current code always interprets it as a short fgets() read instead, and thus keeps calling fgets() until it gets a newline, dropping valid lines and failing with the following error:

pmap: ERROR: inconsistent detail field in smaps file, line: Rss: 212 kB

Merge request reports