redbug icon indicating copy to clipboard operation
redbug copied to clipboard

redbug_dtop: don't crash when racing with process termination

Open mikpe opened this issue 2 years ago • 0 comments

If a process terminates between the list of processes is retrieved in get_prc_data/1 and its reductions are recorded in prc_info/1, then the recorded value will be [] and not a number. Later on as complete/2 is called on the recorded data, a badarith crash occurs because it multiplies a number with that [].

prcinfo/2 needs a clause for reductions which returns 0 not [] as default value for a terminated process.

mikpe avatar Dec 14 '23 08:12 mikpe