[Pyrex] strange pointer behaviour in python shared library

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Nov 3 01:21:55 CET 2005


Anthony Percy wrote:

> It works fine for 26 calls to the function  e.g xltEncPcdata ( ....... 
> const void pContent, ......) in that the pContent value is say 0x801934.
> Then on the 27th call to the same function it has the value say 0x801934 
> but as soon as the first "{"  is passed , e.g as it enteres the function 
> body without executing any line, pContent changes to say 0x19 !!!!

The symptoms you're seeing are probably a result of the
heap or stack getting corrupted earlier somehow. This
sort of problem is very common when dealing with C code,
and can be very difficult to track down.

All I can suggest is that you try to narrow your test case
down to the simplest thing that causes the problem, and
try enabling and disabling various things to try to get
an idea of what might be triggering it -- keeping in
mind that the error is probably occurring some time
*before* any symptoms become apparent.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+



More information about the Pyrex mailing list