Bug 164610

Summary: Directory Server crashes when deleting a view
Product: [Retired] 389 Reporter: Andreas Schmid <andreas.schmid>
Component: Personalized ViewsAssignee: Rich Megginson <rmeggins>
Status: CLOSED NEXTRELEASE QA Contact: Orla Hegarty <ohegarty>
Severity: high Docs Contact:
Priority: medium    
Version: 7.1CC: alexander.stagun, ohegarty
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-04 20:02:52 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:
Attachments:
Description Flags
Example programm in Java that crashes the directory server none

Description Andreas Schmid 2005-07-29 09:20:17 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create a view
2. Delete a view
3. Repeat Step 1 and 2 until server crashes
  

Additional info:

Comment 1 Andreas Schmid 2005-07-29 12:12:41 UTC
Created attachment 117269 [details]
Example programm in Java that crashes the directory server

Comment 3 Rich Megginson 2005-08-11 17:05:19 UTC
Reviewed by: Nathan (Thanks!)
Files: ldapserver/ldap/servers/plugins/views/views.c
Branch: HEAD
Fix Description: Needed to pass in the _address_ of theCache.pCacheViews to
views_cache_add_ll_entry.  Yet another lesson in using the compiler to catch
type errors rather than casting to void*.
Platforms tested: RHEL3
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none

RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/views/views.c,v
retrieving revision 1.5
diff -u -8 -r1.5 views.c
--- ldapserver/ldap/servers/plugins/views/views.c       19 Apr 2005 22:07:36
-0000      1.5
+++ ldapserver/ldap/servers/plugins/views/views.c       11 Aug 2005 16:29:01 -0000
@@ -1524,17 +1524,17 @@
                                Slapi_Value *v;
                                slapi_attr_first_value( attr, &v );
                                theView->parentid = slapi_value_get_ulong(v);
                        }
                        else
                                theView->parentid = 0;
 
                        /* add view to the cache */
-                       views_cache_add_ll_entry((void**)theCache.pCacheViews,
(void *)theView);
+                       views_cache_add_ll_entry((void**)&theCache.pCacheViews,
(void *)theView);
                                                                               
                        views_cache_discover_parent(theView);
                        if(theView->pParent)
                               
views_cache_discover_children((viewEntry*)theView->pParent);
 
                        /* update filters */
                        for(current = theCache.pCacheViews; current != NULL;
current = current->list.pNext)
                        {




Comment 4 To Ngan 2005-11-04 20:02:52 UTC
Verified