Bug 730615 - avoid crash on process attach
Summary: avoid crash on process attach
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-15 05:49 UTC by Alex Jia
Modified: 2011-12-06 11:26 UTC (History)
4 users (show)

Fixed In Version: libvirt-0.9.4-3.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 11:26:38 UTC


Attachments (Terms of Use)
Null pointer passed as an argument to a 'nonnull' parameter (498.49 KB, text/html)
2011-08-16 06:27 UTC, Alex Jia
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Alex Jia 2011-08-15 05:49:36 UTC
Description of problem:
qemuProcessStart always calls qemuProcessWaitForMonitor with a non-negative position, but qemuProcessAttach always calls with -1. In the latter case, there is no log file libvirt can scrape.

Version-Release number of selected component (if applicable):
libvirt upstream

How reproducible:
always

Steps to Reproduce:
1. Detected by ccc-analyzer
2.
3.
  
Actual results:


Expected results:
fix it

Additional info:

Comment 1 Daniel Veillard 2011-08-15 05:51:29 UTC
Upstream commit 5ef1b6c54a43112338db7192fa32921bcf7aca81

Daniel

Comment 3 Alex Jia 2011-08-16 06:27:00 UTC
Created attachment 518407 [details]
Null pointer passed as an argument to a 'nonnull' parameter

ccc-analyzer test report for libvirt upstream (2011-08-04).

Comment 4 Alex Jia 2011-08-16 06:34:20 UTC
libvirt - scan-build results
User:	root@localhost.localdomain
Working Directory:	/root/libvirt
Command Line:	make
Date:	Thu Aug 4 14:28:16 2011
Version:	checker-257 (2011-05-25 09:09:08)
Bug Summary

Results in this analysis run are based on analyzer build checker-257.
Bug Type	                                Quantity	Display?
All Bugs	                                37	
                          API	
Argument with 'nonnull' attribute passed null	1	
                       Dead code	
Idempotent operation	                        12	
                       Dead store	
Dead assignment	                                9	
                       Logic error	
Dereference of null pointer	                15	

Reports
Bug Group 	Bug Type ▾ 	File 	Line 	Path Length 	
API	Argument with 'nonnull' attribute passed null	src /qemu /qemu_process.c	1220	5	View Report

Comment 5 Alex Jia 2011-08-16 06:37:57 UTC
libvirt - scan-build results
User:	root@localhost.localdomain
Working Directory:	/root/libvirt
Command Line:	make
Date:	Mon Aug 15 13:09:59 2011
Version:	checker-257 (2011-05-25 09:09:08)
Bug Summary

Results in this analysis run are based on analyzer build checker-257.
Bug Type	                         Quantity	Display?
All Bugs	                         32	
                       Dead code	
Idempotent operation	                 12	
                       Dead store	
Dead assignment	                         5	
                       Logic error	
Dereference of null pointer	         14	
                       Unix API	
Undefined allocation of 0 bytes	         1

Comment 6 Alex Jia 2011-08-16 06:43:54 UTC
I haven't seen "Argument with 'nonnull' attribute passed null" bug(please see Comment 4 or attachment of Comment 3) in test report of ccc-analyzer again(please see Comment 5), so change the bug to VERIFIED status.

BTW, the above scan-build results base on libvirt upstream(one is Aug 4, the other is Aug 15).


Alex

Comment 7 errata-xmlrpc 2011-12-06 11:26:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1513.html


Note You need to log in before you can comment on or make changes to this bug.