title: *** glibc detected *** python: free(): invalid next size (fast):
body: <p>I have a python program which calls a C function. I send some structures containing mutable characters to c functions and my c function fills the structure.</p>
  
  <p>class myS(Structure):
        <em>fields</em> = [("x", c_int),
                    ("buffer", 100*c_char)]</p>
  
  <p>I send this to C function and C function fills the value in this structure. My program works very fine but after return it throws an error</p>
  
  <p><strong>* glibc detected *</strong> python: free(): invalid next size (fast):</p>
  
  <p>Subsequent execution of program shows one of the following 3 errors on little change in code(such as print "hi").</p>
  
  <p><strong>* glibc detected *</strong> python: malloc(): invalid next size (fast):</p>
  
  <p><strong>* glibc detected *</strong> python: free(): invalid next size (fast):</p>
  
  <p>segmentation fault</p>
  
  <p>Please help me out. Thanks in advance.</p>