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

Many memory leaks #21840

Closed
llvmbot opened this issue Nov 3, 2014 · 11 comments
Closed

Many memory leaks #21840

llvmbot opened this issue Nov 3, 2014 · 11 comments
Labels
bugzilla Issues migrated from bugzilla lld

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 3, 2014

Bugzilla Link 21466
Resolution FIXED
Resolved on Mar 24, 2016 12:42
Version unspecified
OS Windows NT
Attachments leaks
Reporter LLVM Bugzilla Contributor
CC @AaronBallman,@Bigcheese,@dwblaikie,@cooperp

Extended Description

Attached is the asan output of running just

./bin/llvm-lit -sv ./tools/lld/test/pecoff/trivial.test

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jul 7, 2015

This is still failing.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jan 18, 2016

This still fails with, for example, darwin/native-and-mach-o.objtxt.

@cooperp
Copy link
Contributor

cooperp commented Jan 20, 2016

Thanks for the CC.

I just did 'check-lld' with an asan Debug+Asserts build and I don't get any failures.

Did you do anything here other than set 'LLVM_USE_SANITIZER=Address' in cmake?

@cooperp
Copy link
Contributor

cooperp commented Jan 20, 2016

Actually, looks like leaks isn't supported on Mac OS :(

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jan 20, 2016

I am able to reproduce this on linux with just

CC=clang CXX=clang++ cmake ../llvm -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_USE_SANITIZER=Address -DLLVM_ENABLE_ASSERTIONS=ON

and running the test with

./bin/llvm-lit -v ~/llvm/lld/test/darwin/native-and-mach-o.objtxt

I will attach the output. I was also able to reproduce the problem with valgrind instead of asan.

I am doing a build on OS X to see if it reproduces there.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jan 20, 2016

asan leaks

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jan 20, 2016

valgrind log

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jan 20, 2016

Actually, looks like leaks isn't supported on Mac OS :(

:-(

Do you have access to a linux machine (or is valgrind supported on current OS X? It used to work in the past).

@cooperp
Copy link
Contributor

cooperp commented Jan 20, 2016

Actually, looks like leaks isn't supported on Mac OS :(

:-(

Do you have access to a linux machine (or is valgrind supported on current
OS X? It used to work in the past).
Afraid I don't have access to a Linux machine. But I was able to repro the leaks in Instruments on Mac OS.

Its coming from MappingNormalizationHeap on at least a few of the tests. In the non io.outputting() case we are allocating (typically) atoms, but somehow these are getting dropped.

I'd have expected all atoms to get to the pass pipeline and only be dropped by (for example) dead strip in the resolver, so i'll need to see where we are dropping the parsed atoms.

@cooperp
Copy link
Contributor

cooperp commented Mar 17, 2016

Fixed some of these in r263676/r263677.

Looking now to see what else is still leaking.

@cooperp
Copy link
Contributor

cooperp commented Mar 24, 2016

There were a whole bunch more commits over the last few days. The final known ASan leak was fixed in r264097. UBSan is also clean as of r264234.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla lld
Projects
None yet
Development

No branches or pull requests

2 participants