Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak reported by valgrind in 'Query_Processor::new_query_rule' #3262

Closed
5 tasks done
JavierJF opened this issue Jan 21, 2021 · 1 comment
Closed
5 tasks done

Comments

@JavierJF
Copy link
Collaborator

  • A clear description of the issue

Valgrind reports several bytes as definitely lost due to non-freeing of 'Query_Processor' field:

==667751== 28 bytes in 2 blocks are definitely lost in loss record 996 of 2,406
==667751==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==667751==    by 0x4E8DB4E: strdup (in /usr/lib/libc-2.32.so)
==667751==    by 0x47D826: Query_Processor::new_query_rule(int, bool, char*, char*, int, char*, char*, int, char*, char*, char*, bool, char*, int, char*, int, int, int, int, int, int, int, int, int, int, int, char*, char*, int, int, int, int, bool, char*) (Query_Processor.cpp:614)
==667751==    by 0x4DC23F: ProxySQL_Admin::load_mysql_query_rules_to_runtime() (ProxySQL_Admin.cpp:10331)
==667751==    by 0x4CC779: ProxySQL_Admin::init_mysql_query_rules() (ProxySQL_Admin.cpp:8863)
==667751==    by 0x3A593C: ProxySQL_Main_init_Query_module() (main.cpp:997)
==667751==    by 0x3A68B3: ProxySQL_Main_init_phase3___start_all() (main.cpp:1348)
==667751==    by 0x3A8146: main (main.cpp:1787)
  • ProxySQL version

  • v2.0.16

  • v2.1.1 should also be affected.

  • OS version

NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
  • The steps to reproduce the issue

Launch ProxySQL under and create new query rules.

  • The full ProxySQL error log (default location: /var/lib/proxysql/proxysql.log)

valgrind.txt

renecannao added a commit that referenced this issue Jan 21, 2021
Closes #3262: Fixed memory leak in 'Query_Processor::new_query_rule' due to field 'match_digest' never being freed
@JavierJF
Copy link
Collaborator Author

Closed by #3264.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant