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 after a syntax error #211

Closed
ProkopRandacek opened this issue Sep 10, 2022 · 1 comment
Closed

Memory leak after a syntax error #211

ProkopRandacek opened this issue Sep 10, 2022 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@ProkopRandacek
Copy link
Contributor

import name alias strings are not freed when the parsing fails.

==144915==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0x558e5fa91d39 in malloc (/home/prokop/source/umka-lang/build/umka+0x1c7d39)
    #1 0x558e5fb11bb8 in parseImportItem /home/prokop/source/umka-lang/build/../src/umka_decl.c:719:25
    #2 0x558e5fb115be in parseImport /home/prokop/source/umka-lang/build/../src/umka_decl.c:796:9
    #3 0x558e5fb09230 in parseModule /home/prokop/source/umka-lang/build/../src/umka_decl.c:807:9
    #4 0x558e5fb08a5f in parseProgram /home/prokop/source/umka-lang/build/../src/umka_decl.c:824:22
    #5 0x558e5faf0c54 in compilerCompile /home/prokop/source/umka-lang/build/../src/umka_compiler.c:206:5
    #6 0x558e5fad8531 in umkaCompile /home/prokop/source/umka-lang/build/../src/umka_api.c:107:9
    #7 0x558e5fe2dbf4 in main /home/prokop/source/umka-lang/build/../src/umka.c:169:14
    #8 0x7f5d438632cf  (/usr/lib/libc.so.6+0x232cf) (BuildId: 9c28cfc869012ebbd43cdb0f1eebcd14e1b8bdd8)

SUMMARY: AddressSanitizer: 256 byte(s) leaked in 1 allocation(s).

Code that causes the leak:

import R
@vtereshkov vtereshkov changed the title Memory leak Memory leak after a syntax error Sep 10, 2022
@vtereshkov vtereshkov added bug Something isn't working duplicate This issue or pull request already exists labels Sep 10, 2022
@vtereshkov
Copy link
Owner

Closing as duplicate of #212

@vtereshkov vtereshkov closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants