public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libobjc/54432] New: Memory leak when linking libobjc with gcc
@ 2012-08-31  1:49 karlkrch at gmail dot com
  2012-08-31  2:07 ` [Bug libobjc/54432] " karlkrch at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: karlkrch at gmail dot com @ 2012-08-31  1:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54432

             Bug #: 54432
           Summary: Memory leak when linking libobjc with gcc
    Classification: Unclassified
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: libobjc
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: karlkrch@gmail.com


Very simple test case. 

Created a main.m file with contents: 
`int main(){ return 1; }` 

Compile with gcc: 
`gcc main.m -o main -lobjc` 

Run valgrind: 
`valgrind main` 

Get memory leak: 
==27005== HEAP SUMMARY: 
==27005== in use at exit: 8,485 bytes in 133 blocks 
==27005== total heap usage: 145 allocs, 12 frees, 11,053 bytes allocated 
==27005== 
==27005== LEAK SUMMARY: 
==27005== definitely lost: 16 bytes in 1 blocks 
==27005== indirectly lost: 16 bytes in 1 blocks 
==27005== possibly lost: 0 bytes in 0 blocks 
==27005== still reachable: 8,453 bytes in 131 blocks 
==27005== suppressed: 0 bytes in 0 blocks 

If I don't link libobjc then I get no memory leaks. Not sure if this is a gcc
or valgrind bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-31  2:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31  1:49 [Bug libobjc/54432] New: Memory leak when linking libobjc with gcc karlkrch at gmail dot com
2012-08-31  2:07 ` [Bug libobjc/54432] " karlkrch at gmail dot com
2012-08-31  2:11 ` karlkrch at gmail dot com
2012-08-31  2:12 ` karlkrch at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).