Bug 440333
Summary: | Valgrind errors about use of unitialized values | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] 389 | Reporter: | Nathan Kinder <nkinder> | ||||
Component: | Directory Server | Assignee: | Nathan Kinder <nkinder> | ||||
Status: | CLOSED ERRATA | QA Contact: | Chandrasekar Kannan <ckannan> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 1.1.0 | CC: | benl, rmeggins | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2008-08-27 20:39:27 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: | 249650, 453229 | ||||||
Attachments: |
|
Description
Nathan Kinder
2008-04-02 21:19:39 UTC
Created attachment 300140 [details]
CVS Diffs
This fixes the valgrind errors around the mktime calls and the error in the ACL
plug-in. As far as I can tell, we're not doing anything wrong in our code
around the sasl_server_init call.
For the mktime error, we were passing in a "struct tm" to mktime() that isn't
guaranteed to be initialized. The mapage for strptime() sasy that not all
members of this struct will be written do depending on the format that you pass
in. The solution is to initialize the "struct tm" explicitly.
The error in the ACL plug-in is that we were defining the op_type variable as
an unsigned long, but it's really an int. When we passed a pointer to this
variable to have the op filled in by slapi_pblock_get(), it was only
initializing the size of an int, which isn't necessarily the same size as a
long.
After these changes, I no longer see these two errors form valgrind.
Ok. Was this on a 64-bit system? (In reply to comment #2) > Ok. Was this on a 64-bit system? Yes, F8 x86_64. Checked into ldapserver (HEAD). Thanks to Rich for his review! Checking in plugins/acl/acl_ext.c; /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl_ext.c,v <-- acl_ext.c new revision: 1.8; previous revision: 1.7 done Checking in slapd/log.c; /cvs/dirsec/ldapserver/ldap/servers/slapd/log.c,v <-- log.c new revision: 1.22; previous revision: 1.21 done Checked into Directory71RtmBranch. Checking in plugins/acl/acl_ext.c; /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl_ext.c,v <-- acl_ext.c new revision: 1.5.2.1; previous revision: 1.5 done Checking in slapd/log.c; /cvs/dirsec/ldapserver/ldap/servers/slapd/log.c,v <-- log.c new revision: 1.6.2.6; previous revision: 1.6.2.5 done Checked into Directory_Server_8_0_Branch. Checking in ldap/servers/plugins/acl/acl_ext.c; /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl_ext.c,v <-- acl_ext.c new revision: 1.7.2.1; previous revision: 1.7 done Checking in ldap/servers/slapd/log.c; /cvs/dirsec/ldapserver/ldap/servers/slapd/log.c,v <-- log.c new revision: 1.21.2.1; previous revision: 1.21 done An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2008-0602.html |