[Bug libobjc/54432] New: Memory leak when linking libobjc with gcc
karlkrch at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Aug 31 01:49:00 GMT 2012
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.
More information about the Gcc-bugs
mailing list