On Wed, Dec 09, 2020 at 12:55:40PM +0000, Jonathan Wakely via Gcc wrote: > > > I observed some leaks using valgrind while compiling a sample program > > > using GCC. > > > > This seems more appropriate for gcc-h...@gcc.gnu.org instead. > > > > > Could anyone aware of these details provide any insights to these leaks ? > > > > You've provided no information that can tell us anything for sure, but > > these are probably leaks caused by your code. You can use valgrind to > > find them. > > Oh sorry, I missed that you're running gcc itself under valgrind. > Those are probably intentional, because GCC uses garbage collection > for some of its allocations, and knows that it's not going to be a > long-running process, so it will exit fairly soon and all memory will > be freed on exit. > > Using --leak-check=full would still give you more information.
Well, primarily it was run on the gcc driver rather than the actual compiler, the only leaks in the driver would be somewhere in the option handling and would be extremely low priority. Leaks in the compiler are much more interesting. And second, without information which exact gcc version it is, there is nothing that can be done about it anyway. Jakub