Bug 70370

Summary: [PATCH] Fix for SIGSEGV in systemd-bootchart on short-living processes
Product: systemd Reporter: Igor Zhbanov <i.zhbanov>
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium CC: i.zhbanov
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: [PATCH] Fix for SIGSEGV in systemd-bootchart on short-living processes

Description Igor Zhbanov 2013-10-11 09:55:35 UTC
Created attachment 87447 [details]
[PATCH] Fix for SIGSEGV in systemd-bootchart on short-living processes

The function svg_ps_bars() dereferencess NULL pointer in the line
        endtime = ps->last->sampledata->sampletime;
because of partially initialized ps_struct (ps->last == NULL).

If some process terminates between scaning /proc directory in the log_sample()
function and reading additional information from /proc/PID/... files,
the files couldn't be read, the loop will be continued and partially
initialized structure returned.
Comment 1 Zbigniew Jedrzejewski-Szmek 2013-10-18 19:02:16 UTC
Applied in http://cgit.freedesktop.org/systemd/systemd/commit/?id=306e665.
Thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.