Bug 210381

Summary: incorrect memset() call in back-ldbm/perfctrs.c
Product: [Retired] 389 Reporter: Mark Smith <mcs>
Component: Directory ServerAssignee: Rich Megginson <rmeggins>
Status: CLOSED UPSTREAM QA Contact: Chandrasekar Kannan <ckannan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: benl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Windows   
Whiteboard:
Fixed In Version: 389-ds-base-1.2.10.rc1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-07 16:11:21 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: 495079, 690319    

Description Mark Smith 2006-10-11 19:20:17 UTC
In back-ldbm/perfctrs.c in the init_shared_memory() function, memset() is called
with the 2nd and 3rd parameters reversed:

  memset(perf,sizeof(performance_counters),0);

It looks like init_shared_memory() is only called on Windows (where the
performance counters reside in shared memory instead of process memory).  I am
not sure if this causes any problems or not; perhaps the memory is cleared
elsewhere.

I found this using Google code search in someone's tarball of Fedora DS 1.02 and
then I confirmed this still exists in the trunk code by using lxr.

Comment 1 Martin Kosek 2012-01-04 13:48:16 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/140

Comment 2 Rich Megginson 2012-02-07 16:11:21 UTC
Fixed in 389-ds-base-1.2.10.rc1 now in Fedora/EPEL Testing