Hi,
This patch addresses issue with *stack smashing* while processing large perf.data files (>350 MB) e.g. obtained during Spec2017 sub-benchmarks' runs:
Example lnt profile upgrade failure:
$ lnt profile upgrade perf.data.510.parest_r.0 perf.data.510.parest_r.0.lnt *** stack smashing detected ***: /opt/venv_lnt/bin/python terminated
Change Description
Arbitrary size of temp buffers One, Two, Three & Four in function NmOutput::fetchSymbols() is in some circumstances too small and buffer(s) overflow while processing line of data.
- Changes
- New function NmOutput::splitLine(line, vector_of_substrings) manages strings properly.
- Encapsulate One, Two, Three & Four into std::string objects for proper variable string length memory management.
Patch testing
Tested done by running stock LNT against my modification and comparison between output lnt profile files (size, md5).