bin/167361: pmcstat crashed if symbols found (striped image)

Slawa Olhovchenkov slw at zxy.spb.ru
Fri Apr 27 12:30:11 UTC 2012


>Number:         167361
>Category:       bin
>Synopsis:       pmcstat crashed if symbols found (striped image)
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 27 12:30:11 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Slawa Olhovchenkov
>Release:        10-CURRENT
>Organization:
>Environment:
FreeBSD  10.0-CURRENT FreeBSD 10.0-CURRENT #18: Tue Apr 24 16:42:14 MSK 2012     root@:/usr/obj/usr/src/sys/NETMAP  amd64

>Description:
pmcstat try to load symbols from striped files and crashed at pmcstat_log.c:592 (symptr is NULL).

>How-To-Repeat:
Run pmcstat on system with striped world.

>Fix:
patch pmcstat_log.c

Patch attached with submission follows:

--- pmcstat_log.c.orig	2012-04-27 15:50:05.000000000 +0400
+++ pmcstat_log.c	2012-04-27 15:50:56.000000000 +0400
@@ -565,6 +565,8 @@
 	image->pi_symcount += newsyms;
 
 	assert(newsyms <= nfuncsyms);
+	if(image->pi_symcount == 0)
+	    return;
 
 	/*
 	 * Return space to the system if there were duplicates.


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list