Bug 435048 - pfmon using uninitialized value on ia64
Summary: pfmon using uninitialized value on ia64
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pfmon
Version: rawhide
Hardware: ia64
OS: Linux
high
high
Target Milestone: ---
Assignee: William Cohen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: fedora-ia64
TreeView+ depends on / blocked
 
Reported: 2008-02-27 00:25 UTC by Doug Chapman
Modified: 2008-04-08 12:43 UTC (History)
0 users

Fixed In Version: 3.3-0.080225.4.fc9
Clone Of:
Environment:
Last Closed: 2008-04-08 12:43:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch to fix ia64 build (1.28 KB, patch)
2008-02-27 00:25 UTC, Doug Chapman
no flags Details | Diff
Avoid using bogus/null values (1.32 KB, patch)
2008-04-04 21:27 UTC, William Cohen
no flags Details | Diff

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!



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