Bug 435048 - pfmon using uninitialized value on ia64
pfmon using uninitialized value on ia64
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: pfmon (Show other bugs)
rawhide
ia64 Linux
high Severity high
: ---
: ---
Assigned To: William Cohen
Fedora Extras Quality Assurance
:
Depends On:
Blocks: fedora-ia64
  Show dependency treegraph
 
Reported: 2008-02-26 19:25 EST by Doug Chapman
Modified: 2008-04-08 08:43 EDT (History)
0 users

See Also:
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 08:43:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Doug Chapman 2008-02-26 19:25:40 EST
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-26 19:25:40 EST
Created attachment 296007 [details]
patch to fix ia64 build
Comment 2 William Cohen 2008-04-04 17:27:03 EDT
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-04 23:04:14 EDT
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 13:51:54 EDT
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 09:33:09 EDT
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 08:32:13 EDT
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.