different result valgrind on different OS

F

fakessh @

hello doctor
hello honorable

I work on a small project in c.
https://raw.github.com/fakessh/openprojectssl/master/smtp_openssl.c
This is an smtp client with minimal authentication. I use
openssl successfully to encode base64 data are

I just did my first tests with valgrind
and I get different results on centos 5 and centos 6

this is the end of the trace of valgrind

on centos 5
==18553== LEAK SUMMARY:
==18553== definitely lost: 0 bytes in 0 blocks
==18553== indirectly lost: 0 bytes in 0 blocks
==18553== possibly lost: 36 bytes in 3 blocks
==18553== still reachable: 106,700 bytes in 2,163 blocks
==18553== suppressed: 0 bytes in 0 blocks
==18553==
==18553== For counts of detected and suppressed errors, rerun
with: -v
==18553== ERROR SUMMARY: 3 errors from 3 contexts
(suppressed: 29 from 10)


on centos 6
==8836== LEAK SUMMARY:
==8836== definitely lost: 0 bytes in 0 blocks
==8836== indirectly lost: 0 bytes in 0 blocks
==8836== possibly lost: 0 bytes in 0 blocks
==8836== still reachable: 39,320 bytes in 2,485 blocks
==8836== suppressed: 0 bytes in 0 blocks
==8836==
==8836== For counts of detected and suppressed errors, rerun
with: -v
==8836== ERROR SUMMARY: 349 errors from 6 contexts
(suppressed: 29 from 10)

there are a number of very different error and centos 5 shows
a memory leak

can you help me find the problems in my code
 
B

Ben Bacarisse

fakessh @ said:
hello doctor
hello honorable

I work on a small project in c.
https://raw.github.com/fakessh/openprojectssl/master/smtp_openssl.c
This is an smtp client with minimal authentication. I use
openssl successfully to encode base64 data are

I just did my first tests with valgrind
and I get different results on centos 5 and centos 6

this is the end of the trace of valgrind

on centos 5
==18553== LEAK SUMMARY:
==18553== definitely lost: 0 bytes in 0 blocks
==18553== indirectly lost: 0 bytes in 0 blocks
==18553== possibly lost: 36 bytes in 3 blocks
==18553== still reachable: 106,700 bytes in 2,163 blocks
==18553== suppressed: 0 bytes in 0 blocks
==18553==
==18553== For counts of detected and suppressed errors, rerun
with: -v
==18553== ERROR SUMMARY: 3 errors from 3 contexts
(suppressed: 29 from 10)


on centos 6
==8836== LEAK SUMMARY:
==8836== definitely lost: 0 bytes in 0 blocks
==8836== indirectly lost: 0 bytes in 0 blocks
==8836== possibly lost: 0 bytes in 0 blocks
==8836== still reachable: 39,320 bytes in 2,485 blocks
==8836== suppressed: 0 bytes in 0 blocks
==8836==
==8836== For counts of detected and suppressed errors, rerun
with: -v
==8836== ERROR SUMMARY: 349 errors from 6 contexts
(suppressed: 29 from 10)

there are a number of very different error and centos 5 shows
a memory leak

can you help me find the problems in my code

If you compile with -g (debug symbols on) valgrind will tell on exactly
what line the error occurred (and, usually, on what line the offending
memory was allocated). With such a small program, it should not be hard
to use this information to find out exactly what it wrong.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top