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

support analysis on-the-fly (interposition) #195

Open
dkrupp opened this issue Dec 7, 2015 · 4 comments
Open

support analysis on-the-fly (interposition) #195

dkrupp opened this issue Dec 7, 2015 · 4 comments
Labels
analyzer 📈 Related to the analyze commands (analysis driver) discussion 💡 enhancement 🌟

Comments

@dkrupp
Copy link
Member

dkrupp commented Dec 7, 2015

from cfe-dev:"
One important use case that scan-build/ccc-analyzer supports but that the LD_PRELOAD + compilation database approach doesn’t is running the analyzer as the code is being built rather than replaying the build commands later. This is important build systems that move or modify build system intermediates. I think it would be good to continue to have a way to support such projects. "

should support this feature through the CC/CXX environment variables and through the ld_logger.

@Xazax-hun
Copy link
Contributor

scan-build-py supports this feature, probably we should use that.

@whisperity whisperity added the analyzer 📈 Related to the analyze commands (analysis driver) label Aug 19, 2017
@bruntib
Copy link
Contributor

bruntib commented Apr 12, 2019

Are we going to join logging and analysis phase ever? I don't think it would be relevant in the future.

@Xazax-hun
Copy link
Contributor

I think the main advantage of interposition is that it supports build systems where generated code is cleaned up at the and of the build process. We cannot handle such systems using the current model. We can say that such scenarios are not and never will be supported but it should be stated somewhere in the documentation.

@whisperity
Copy link
Contributor

Cheap man's solution:

  • we could provide a custom POSIX/GNU rm entrypoint by prepending the PATH of the running build, which only logs the files-to-be-deleted and do the actual remove in post-processing
  • if the build system / compiler isn't using rm but rather the unlink() syscall, LD_PRELOAD might be able to give a custom behaviour for unlink too.

@Xazax-hun Do you have an overview/sketch idea how scan-build(-py?) does this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer 📈 Related to the analyze commands (analysis driver) discussion 💡 enhancement 🌟
Projects
None yet
Development

No branches or pull requests

5 participants