Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Apr 2012 12:27:52 GMT
From:      Slawa Olhovchenkov <slw@zxy.spb.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/167361: pmcstat crashed if symbols found (striped image)
Message-ID:  <201204271227.q3RCRq3K053016@red.freebsd.org>
Resent-Message-ID: <201204271230.q3RCUBAV013459@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204271227.q3RCRq3K053016>