Closed
Bug 391244
Opened 17 years ago
Closed 6 years ago
tracking - review memory menagement in libpkix
Categories
(NSS :: Libraries, defect, P1)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
WONTFIX
3.12.2
People
(Reporter: alvolkov.bgs, Assigned: alvolkov.bgs)
References
(Depends on 2 open bugs)
Details
(Whiteboard: PKIX)
LibPkix is designed so that every library function has a pointer to void as the last argument. Pointer to PKIX_PL_NssContext casted to void* is the actual data poiter that get passed to the library functions. PRArenaPort* is one of the members of PKIX_PL_NssContext. If NssContext_Create is called with arena set to PKIX_TRUE, an arena pool will be created and used for majority of object allocations. There are two types of PKIX_PL_NssContext objects involved in operations of libpkix. First type is single global object that is allocated at pkix initialization time and mainly supposed to be used for cache memory allocations. Second type are PKIX_PL_NssContext objects allocated before every call of PKIX_BuildChain and used for new allocations during a particula cert chaing building or validation. The design creates a problem when an arena is used by many threads to allocate multiple objects that will result in significant memory use growth as the most of the objects in cache wont be deallocated until library shutdown. Also, the cert/crl, etc date will need to be copied to global arena every time an object is cached. As a part of this bug resolution one should deeply understand libpkix memory allocation. One of the possible solution is to use per object arena, but this approach will result in increased allocation sys calls.
Assignee | ||
Updated•17 years ago
|
Whiteboard: PKIX
Assignee | ||
Updated•17 years ago
|
Priority: -- → P1
Assignee | ||
Comment 1•17 years ago
|
||
valid Nelson's comment from bug 389904#c8 that also should be addressed in this bug.
Summary: libpkix: use PKIX_PL_NssContext arena can create a problem if used for PKIX_PL_Cert data allocation → review memory menagement in libpkix
Updated•17 years ago
|
Version: 3.12 → trunk
Updated•17 years ago
|
Summary: review memory menagement in libpkix → tracking - review memory menagement in libpkix
Assignee | ||
Updated•16 years ago
|
Target Milestone: 3.12 → 3.12.1
Updated•16 years ago
|
Target Milestone: 3.12.1 → 3.12.2
Updated•6 years ago
|
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•