Open Bug 1546273 Opened 6 years ago Updated 3 years ago

freebl/ecl uses malloc/free

Categories

(NSS :: Libraries, defect, P3)

Tracking

(Not tracked)

People

(Reporter: glandium, Unassigned)

Details

While working on bug 1531887, I found that freebl/ecl/ecl.c, ecl_gf.c and ecp_jm.c are using malloc/free rather than PR_Malloc/PR_Free like other parts of NSS (and even freebl). I don't think this is expected.

Or PORT_Alloc/PORT_Free.

Let's get this cleaned up next cycle. Thanks for the catch, Mike.

Priority: -- → P1

Hello - Mike, I'm thinking of looking at this but just got a bit thrown over the mention of the PR_ and PORT_ methods (I'm new to the codebase so apologies if I'm overlooking anything).

For example, I can see PORT_Alloc calls PR_Malloc but PR_Malloc may call malloc() or a zone allocator (I'm not sure what that is either but that's from a first glance without reading the code further).

When would you use the PORT_ methods over the PR_ methods?

Flags: needinfo?(mh+mozilla)

NSS should probably always use PORT_Alloc.

Flags: needinfo?(mh+mozilla)

Yes, PORT_ is desired.

Severity: normal → minor

Thanks for the replies! I'm looking at another ticket right now but if this one is still unassigned when I'm next free to pick up something, I'll give an update here

Probably not a P1

Priority: P1 → P2
Priority: P2 → P3
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.