Bug 70370 - [PATCH] Fix for SIGSEGV in systemd-bootchart on short-living processes
Summary: [PATCH] Fix for SIGSEGV in systemd-bootchart on short-living processes
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-11 09:55 UTC by Igor Zhbanov
Modified: 2013-10-18 19:02 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
[PATCH] Fix for SIGSEGV in systemd-bootchart on short-living processes (1.23 KB, text/plain)
2013-10-11 09:55 UTC, Igor Zhbanov
Details

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.