Closed Bug 1283380 Opened 8 years ago Closed 8 years ago

Enable DB tests on LSan runs

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ttaubert, Assigned: ttaubert)

References

Details

Attachments

(1 file)

      No description provided.
Comment on attachment 8766689 [details] [diff] [review]
0001-Bug-1283380-Enable-DB-tests-on-LSan-runs.patch

Review of attachment 8766689 [details] [diff] [review]:
-----------------------------------------------------------------

::: cmd/dbtest/dbtest.c
@@ +124,5 @@
>      if (optstatus == PL_OPT_BAD)
>          Usage(progName);
>  
> +    if (dbDir) {
> +        char *tmp = dbDir;

Not sure if I understand this. What exactly is the reason for this? dbDir is already a char*. SECU_ConfigDirectory wants a const char* btw.
Attachment #8766689 - Flags: review?(franziskuskiefer)
(In reply to Franziskus Kiefer [:fkiefer or :franziskus] from comment #2)
> > +    if (dbDir) {
> > +        char *tmp = dbDir;
> 
> Not sure if I understand this. What exactly is the reason for this? dbDir is
> already a char*. SECU_ConfigDirectory wants a const char* btw.

A few lines above there is |dbDir = PORT_Strdup(optstate->value)| and that's what we're leaking. I have to make this little dance here because sometimes |dbDir| is |SECU_DefaultSSLDir()| and then we must not free.
Comment on attachment 8766689 [details] [diff] [review]
0001-Bug-1283380-Enable-DB-tests-on-LSan-runs.patch

Review of attachment 8766689 [details] [diff] [review]:
-----------------------------------------------------------------

ok, makes sense
Attachment #8766689 - Flags: review+
https://hg.mozilla.org/projects/nss/rev/b48a3a0f914c
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: