PyObject sanitizer (CPython 2.4.4)

Discussion in 'Python' started by sndive@gmail.com, Nov 6, 2007.

  1. Guest

    I get this from valgrind (no suppression file but thgis probably is
    not covered by the suppressor anyway):
    ==6108== Invalid read of size 4
    ==6108== at 0x48D19F4: lookdict_string (dictobject.c:359)
    ==6108== by 0x48D1B59: PyDict_GetItem (dictobject.c:554)
    ==6108== by 0x48B1657: instance_getattr2 (classobject.c:741)
    ==6108== by 0x48B701D: instance_getattr1 (classobject.c:725)
    ==6108== by 0x48B2670: instance_getattr (classobject.c:764)
    ==6108== by 0x48D6500: PyObject_GetAttr (object.c:1088)
    ==6108== by 0x48D6355: PyObject_GetAttrString (object.c:1031)

    so i wonder if the PyObject i gave to PyObject_GetAttrString to gnaw
    on is in good shape.
    is assert(obj->ob_refcnt>0); a good way to check if i'm dealing with a
    valid PyObject
    or there is a helper that can do this for me?
     
    , Nov 6, 2007
    #1
    1. Advertising

  2. schrieb:
    > I get this from valgrind (no suppression file but thgis probably is
    > not covered by the suppressor anyway):
    > ==6108== Invalid read of size 4
    > ==6108== at 0x48D19F4: lookdict_string (dictobject.c:359)
    > ==6108== by 0x48D1B59: PyDict_GetItem (dictobject.c:554)
    > ==6108== by 0x48B1657: instance_getattr2 (classobject.c:741)
    > ==6108== by 0x48B701D: instance_getattr1 (classobject.c:725)
    > ==6108== by 0x48B2670: instance_getattr (classobject.c:764)
    > ==6108== by 0x48D6500: PyObject_GetAttr (object.c:1088)
    > ==6108== by 0x48D6355: PyObject_GetAttrString (object.c:1031)
    >
    > so i wonder if the PyObject i gave to PyObject_GetAttrString to gnaw
    > on is in good shape.
    > is assert(obj->ob_refcnt>0); a good way to check if i'm dealing with a
    > valid PyObject
    > or there is a helper that can do this for me?


    google: python valgrind

    First link:

    http://svn.python.org/projects/python/trunk/Misc/README.valgrind

    Diez
     
    Diez B. Roggisch, Nov 6, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Olivier Sessink
    Replies:
    0
    Views:
    394
    Olivier Sessink
    Feb 24, 2005
  2. Ilias Lazaridis
    Replies:
    11
    Views:
    468
    George Sakkis
    Feb 19, 2008
  3. Steve Holden
    Replies:
    2
    Views:
    340
    Ilias Lazaridis
    Feb 18, 2008
  4. Ilias Lazaridis
    Replies:
    12
    Views:
    204
    George Sakkis
    Feb 19, 2008
  5. Ilias Lazaridis
    Replies:
    7
    Views:
    184
    George Sakkis
    Feb 19, 2008
Loading...

Share This Page