From: Stephen W. <st...@ic...> - 2008-02-15 18:56:55
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Cary R. wrote: > Hi Steve, > > Have you used valgrind or some other memory checker on Icarus? I was > seeing a strange T0 problem with some of the real values so I installed > valgrind to help track down the problem. I'm still working on that, but I > also ran it on my integer tests and I appear to have found a small problem > with user functions. I have hot used valgrind. Others have, and have found and fixed bugs as a result, so I believe it works, but I personally have not done it. > I don't understand exactly what is going on with the integer stuff and > wanted to push it your direction, but thought it prudent to see if you had > the tools to deal with the problem first. As you could probably guess it > is at a word boundary. It is triggered when calling a user defined > function in a continuous assignment with 32 bit wide values on a 32 bit > machine. If I change everything to 31 or 33 bit things not longer read > invalid memory, but the 33 bit case appears to allocate more memory than > needed. The compiled code looks to be correct in all cases. Is there also a problem at exactly 64bits (on a 32bit system)? Integer arithmetic converts logic to an array of longs to hold the bits that are then used in the calculations. Could the problem be in that area? User defined functions are processed by a vthread just like behavioral code, so does a purely behavioral version have similar troubles? If you post the example code you're working with I might be able to help describe what's at least supposed to be happening. > The example program is producing the correct results for my simple test, > but could fail without warning for different input values. I can get back > to this after I fix the real problems, but since you were just working in > the user function code you could likely fix it faster. > > Let me know what you would like me to do. I can provide more details and a > patch with some fprintf/cerr statements to show what is going on at > various points in the code. I'm actually busy (when I'm not working on day job of course) reworking the compiler handling of lexical scope so my head is full of a different part of the code at the moment. - -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHteB1rPt1Sc2b3ikRAkhnAJ4jF+JV1oJP2qOO5GuT+9qGiAd3fwCbBe3x rBiTl5ELRJX5bEGXQPIqHFI= =JzVH -----END PGP SIGNATURE----- |