Grinding Leaks:
- cd eupnp
- ./autogen.sh
- make
- Create the lt binary under .lib: EINA_ERROR_LEVEL=3 ./src/bin/eupnp_basic_control_point
- Valgrind it: EINA_ERROR_LEVEL=3 valgrind --leak-check=full --num-callers=6 --show-reachable=yes src/bin/.libs/lt-eupnp_basic_control_point
==17842== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 23 from 1)
==17842== malloc/free: in use at exit: 0 bytes in 0 blocks.
==17842== malloc/free: 36 allocs, 36 frees, 7,265 bytes allocated.
==17842== For counts of detected errors, rerun with: -v
==17842== All heap blocks were freed -- no leaks are possible.
Zaroo leaks!
Test construction failure leaks: two instances, one binds to the address, the other can't bind, check for leaks
Output:
[eupnp_udp_transport.c:85] eupnp_udp_transport_prepare() Error binding. Address already in use
[eupnp_udp_transport.c:135] eupnp_udp_transport_new() Could not prepare socket.
[eupnp_ssdp.c:324] eupnp_ssdp_server_new() Could not create SSDP server instance.
[eupnp_control_point.c:86] eupnp_control_point_new() Could not create control point.
==18183==
==18183== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 23 from 1)
==18183== malloc/free: in use at exit: 0 bytes in 0 blocks.
==18183== malloc/free: 23 allocs, 23 frees, 1,490 bytes allocated.
==18183== For counts of detected errors, rerun with: -v
==18183== All heap blocks were freed -- no leaks are possible.
0 comentários:
Post a Comment