#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2011
    Posts
    27
    Rep Power
    0

    Valgrind error in python


    Hi...

    I am facing the problem python along with valgrind. I was getting default valgrind warnings messages. I have created the sample.py. sample.py file does not have any code. I created empty py file to confirm that my code does not have any memory leaks.

    Following is the valgrind command that I am using in command line:
    valgrind --leak-check=full --show-reachable=yes --error-limit=no --gen-suppressions=all --log-file=msm_suppress.log -v /home/arunspra/py_src/Python-2.7.5/python sample.py

    I was getting plenty of valgrind warnings.

    I surfed in the google and I got to know that i need to configure python by disabling pymalloc. As said by technical peoples, If pymalloc was disabled, we would not got any memory related errors. But i was getting the memory related error. Following is my command that i used to disable pymalloc:

    ./configure --without-pymalloc --with-pydebug
    make

    Then I ran above said valgrind command. I was getting 1299 valgrind warnings. If i enable pymalloc, I was getting only 108 valgrind warnings.

    Following is my software versions:
    Cent os: 7.3
    Python: 2.7.5
    Valgrind: 3.12.0



    PS: If i configure and build python, i was getting an Import Error: No module named netifaces. I am using netifaces in my project. If i use system inbuilt python, i am not getting netifaces import error.

    Can anyone please advice me to resolve this issue.
  2. #2
  3. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Posts
    5,972
    Rep Power
    510
    Please report to https://bugs.python.org/
    And mention Victor Stinner. As I recall Victor has extensive experience with valgrind in python. Thank you.
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2011
    Posts
    27
    Rep Power
    0
    Originally Posted by b49P23TIvg
    Please report to https://bugs.python.org/
    And mention Victor Stinner. As I recall Victor has extensive experience with valgrind in python. Thank you.
    thank u

IMN logo majestic logo threadwatch logo seochat tools logo