Bug 210381 - incorrect memset() call in back-ldbm/perfctrs.c
Summary: incorrect memset() call in back-ldbm/perfctrs.c
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: 389
Classification: Retired
Component: Directory Server
Version: 7.1
Hardware: i386
OS: Windows
medium
medium
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 389_1.3.0 690319
TreeView+ depends on / blocked
 
Reported: 2006-10-11 19:20 UTC by Mark Smith
Modified: 2015-01-04 23:21 UTC (History)
1 user (show)

Fixed In Version: 389-ds-base-1.2.10.rc1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-07 16:11:21 UTC
Embargoed:


Attachments (Terms of Use)

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


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