Opened 3 years ago

Closed 3 years ago

#23691 closed defect (fixed)

leak in test_util_decompress_dos_impl()

Reported by: catalyst Owned by: catalyst
Priority: Medium Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


On master, make check results in multiple errors of the form

==52419==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 3145728 byte(s) in 3 object(s) allocated from:
    #0 0x7f4b123de602 in malloc (/usr/lib/x86_64-linux-gnu/
    #1 0x55a23af687ea in tor_malloc_ src/common/util.c:150
    #2 0x55a23af68891 in tor_malloc_zero_ src/common/util.c:178
    #3 0x55a23aa4a70a in test_util_decompress_dos_impl src/test/test_util.c:2555
    #4 0x55a23aa4a70a in test_util_decompress_dos src/test/test_util.c:2597
    #5 0x55a23aaa7468 in testcase_run_bare_ src/ext/tinytest.c:106
    #6 0x55a23aaa78a0 in testcase_run_one src/ext/tinytest.c:253
    #7 0x55a23aaa8dd3 in tinytest_main src/ext/tinytest.c:435
    #8 0x55a23a69ed98 in main src/test/testing_common.c:319
    #9 0x7f4b1003a82f in __libc_start_main (/lib/x86_64-linux-gnu/

SUMMARY: AddressSanitizer: 3145728 byte(s) leaked in 3 allocation(s).
FAIL src/test/test (exit status: 23)

It looks like a simple case of failing to free input; I'll write up a patch.

Child Tickets

Change History (5)

comment:1 Changed 3 years ago by catalyst

Component: - Select a componentCore Tor/Tor
Milestone: Tor: 0.3.2.x-final

comment:2 Changed 3 years ago by catalyst

Status: assignedneeds_review

comment:3 Changed 3 years ago by isis

Keywords: added

Not really a "must" per se, but I'm nominating for inclusion since it's small and "make check" shouldn't ever be broken for release/maint or an alpha, imho.

comment:4 Changed 3 years ago by ahf

Status: needs_reviewmerge_ready

The patch looks good to me.

comment:5 Changed 3 years ago by nickm

Resolution: fixed
Status: merge_readyclosed

ok; merging!

Note: See TracTickets for help on using tickets.