Bug 435048

Summary: pfmon using uninitialized value on ia64
Product: [Fedora] Fedora Reporter: Doug Chapman <dchapman>
Component: pfmonAssignee: William Cohen <wcohen>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: 3.3-0.080225.4.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-08 12:43:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 163350    
Attachments:
Description Flags
patch to fix ia64 build
none
Avoid using bogus/null values none

Description Doug Chapman 2008-02-27 00:25:40 UTC
Description of problem:
The latest pfmon package fails to build on ia64:

dear_hist_ia64.c: In function 'dear_hist_process_samples_normal':
dear_hist_ia64.c:189: error: 'csmpl' is used uninitialized in this function

from dear_hist_ia64.c:

        pfmon_smpl_desc_t *csmpl;
<.. snip ..>
        void *hash_desc = csmpl->data, *data;

csmpl really never is set to anything before we set a pointer to one of it's
fields.  Looking at where hash_desc is used I see that we really do need this to
be initialized to something.

Since csmpl is later initialized as:

csmpl = &sdesc->csmpl;

I _assume_ what was meant for the hash_desc initialization was to initialize
hash_desc after csmpl is set.  Please confirm this is what is intended (it
compiles but I don't know enough about pfmon to really test it).


Also, there was one other much more trivial case of using an uninitialized
variable in this patch:

inst_hist_ia64_old_smpl.c: In function 'inst_hist_show_results':
inst_hist_ia64_old_smpl.c:311: error: 'ns' may be used uninitialized in this
function

I will post a patch that fixes both issues.


Version-Release number of selected component (if applicable):
pfmon-3.3-0.080225.1.fc9

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Doug Chapman 2008-02-27 00:25:40 UTC
Created attachment 296007 [details]
patch to fix ia64 build

Comment 2 William Cohen 2008-04-04 21:27:03 UTC
Created attachment 301349 [details]
Avoid using bogus/null values

I don't have an ia64 machine running f9 to check this out on. Could you verify
that the attached patch resolves this problem? If it does, I will go ahead and
put it in the package.

Comment 3 William Cohen 2008-04-05 03:04:14 UTC
The pfmon-3.3-0.080225.3.fc9 source rpm includes patch. Could you verify that it
builds without error on ia64 fedora?

Comment 4 Doug Chapman 2008-04-05 17:51:54 UTC
William, 

Your patch addresses the csmpl bit but not the part about "ns" being
uninitialized.  See the build log here:

http://ia64.koji.fedoraproject.org/koji/getfile?taskID=46696&name=build.log



Comment 5 William Cohen 2008-04-07 13:33:09 UTC
A patch has been checked in to address the initialization of ns.  Assuming no
other lurking ia64 build issues, pfmon-3.3-0.080225.4.fc9 should build.

Comment 6 Doug Chapman 2008-04-08 12:32:13 UTC
The latest version does indeed build cleanly on ia64.  Thanks!