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

memory leak in pmh_markdown_to_elements #24

Open
NotmebutWind opened this issue Jan 3, 2023 · 1 comment
Open

memory leak in pmh_markdown_to_elements #24

NotmebutWind opened this issue Jan 3, 2023 · 1 comment

Comments

@NotmebutWind
Copy link

input value :#@$^^&^(
1 enter the project code path
2 CC=gcc -fsanitize=address make
3 ./highligher #@$^^&
^(
4 program crash and the stacktrace is :
Direct leak of 248 byte(s) in 1 object(s) allocated from:
#0 0x7fea12e49867 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x5579e98e3dd0 in mk_parser_data /opt1/software/peg-markdown-highlight/pmh_parser.c:153
#2 0x5579e98e58d9 in pmh_markdown_to_elements /opt1/software/peg-markdown-highlight/pmh_parser.c:516
#3 0x5579e9942d2e in main /opt1/software/peg-markdown-highlight/highlighter.c:75

@NotmebutWind NotmebutWind changed the title memory leak in memory leak in pmh_markdown_to_elements Jan 3, 2023
@NotmebutWind
Copy link
Author

also

==937359==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1024 byte(s) in 1 object(s) allocated from:
#0 0x7fea12e49867 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x5579e9942806 in get_contents /opt1/software/peg-markdown-highlight/highlighter.c:22
#2 0x5579e9942d0e in main /opt1/software/peg-markdown-highlight/highlighter.c:74
#3 0x7fea12b96d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

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