Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #33039
Closed (moved) (moved)
Open
Issue created Jan 23, 2020 by Nick Mathewson@nickm🌻

Memory leaks in handle_control_getconf

Found while investigating #33006 (moved):

=================================================================
==180005==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7fb54c5cdc58 in __interceptor_malloc (/lib64/libasan.so.5+0x10dc58)
    #1 0x55a4af274f3a in tor_malloc_ src/lib/malloc/malloc.c:45
    #2 0x55a4af274fd0 in tor_malloc_zero_ src/lib/malloc/malloc.c:71
    #3 0x55a4af2371ca in config_line_append src/lib/encoding/confline.c:40
    #4 0x55a4aeffaec7 in control_reply_add_one_kv src/feature/control/control_proto.c:345
    #5 0x55a4aefdd2ae in handle_control_getconf src/feature/control/control_cmd.c:307
    #6 0x55a4aefe54b2 in handle_single_control_command src/feature/control/control_cmd.c:2376
    #7 0x55a4aefe54b2 in handle_control_command src/feature/control/control_cmd.c:2407
    #8 0x55a4aefd6e01 in connection_control_process_inbuf src/feature/control/control.c:508
    #9 0x55a4aeee0e01 in connection_handle_read_impl src/core/mainloop/connection.c:3737
    #10 0x55a4aeee0e01 in connection_handle_read src/core/mainloop/connection.c:3777
    #11 0x55a4aeeecf00 in conn_read_callback src/core/mainloop/mainloop.c:892
    #12 0x7fb54c32abb6  (/lib64/libevent-2.1.so.6+0x25bb6)

Indirect leak of 26 byte(s) in 1 object(s) allocated from:
    #0 0x7fb54c55652d in strdup (/lib64/libasan.so.5+0x9652d)
    #1 0x55a4af2751d0 in tor_strdup_ src/lib/malloc/malloc.c:165
    #2 0x55a4af2371d5 in config_line_append src/lib/encoding/confline.c:41
    #3 0x55a4aeffaec7 in control_reply_add_one_kv src/feature/control/control_proto.c:345
    #4 0x55a4aefdd2ae in handle_control_getconf src/feature/control/control_cmd.c:307
    #5 0x55a4aefe54b2 in handle_single_control_command src/feature/control/control_cmd.c:2376
    #6 0x55a4aefe54b2 in handle_control_command src/feature/control/control_cmd.c:2407
    #7 0x55a4aefd6e01 in connection_control_process_inbuf src/feature/control/control.c:508
    #8 0x55a4aeee0e01 in connection_handle_read_impl src/core/mainloop/connection.c:3737
    #9 0x55a4aeee0e01 in connection_handle_read src/core/mainloop/connection.c:3777
    #10 0x55a4aeeecf00 in conn_read_callback src/core/mainloop/mainloop.c:892
    #11 0x7fb54c32abb6  (/lib64/libevent-2.1.so.6+0x25bb6)

Indirect leak of 7 byte(s) in 1 object(s) allocated from:
    #0 0x7fb54c55652d in strdup (/lib64/libasan.so.5+0x9652d)
    #1 0x55a4af2751d0 in tor_strdup_ src/lib/malloc/malloc.c:165
    #2 0x55a4af2371f5 in config_line_append src/lib/encoding/confline.c:42
    #3 0x55a4aeffaec7 in control_reply_add_one_kv src/feature/control/control_proto.c:345
    #4 0x55a4aefdd2ae in handle_control_getconf src/feature/control/control_cmd.c:307
    #5 0x55a4aefe54b2 in handle_single_control_command src/feature/control/control_cmd.c:2376
    #6 0x55a4aefe54b2 in handle_control_command src/feature/control/control_cmd.c:2407
    #7 0x55a4aefd6e01 in connection_control_process_inbuf src/feature/control/control.c:508
    #8 0x55a4aeee0e01 in connection_handle_read_impl src/core/mainloop/connection.c:3737
    #9 0x55a4aeee0e01 in connection_handle_read src/core/mainloop/connection.c:3777
    #10 0x55a4aeeecf00 in conn_read_callback src/core/mainloop/mainloop.c:892
    #11 0x7fb54c32abb6  (/lib64/libevent-2.1.so.6+0x25bb6)

SUMMARY: AddressSanitizer: 65 byte(s) leaked in 3 allocation(s).
Exit code was 1
 success (15.21s)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking