vmprof / vmprof-python

vmprof - a statistical program profiler
https://vmprof.readthedocs.io
Other
433 stars 55 forks source link

Ensuring adr_dict is split correctly #184

Closed johanols closed 6 years ago

johanols commented 6 years ago

Normally the dictionary adr_dict contains lines with four components all separated by a colon (:). In the case of generated code the last component may contain the generated code instead of the filename of the file where the code resides. Since generated code most likely will contain at least one colon the full line will contain more than the expected three colons resulting in a 'too many values to unpack' error.

To ensure that this string can always be safely split the 'maxsplit' parameter should be set to 3.

rlamy commented 6 years ago

Sorry for the late review. Thanks, looks good!