On Sat, Nov 13, 2004 at 07:15:00PM +0100, Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
I run with rtldebug all the time. Haven't seen this.
Perhaps this is because you run it with normal ints... :)
Well, I got it... In f_allocate() builtin there is a call to get_all_args() but int arument was declared as INT32, while format is "%+", I use --with-long-long-ints (just for testing) - so... :)
This kind of errors is extremely difficult to spot... No (known to me) memory profilers do checks for local (stack) variables access...
In Pike 7.6 f_allocate() doesn't use get_all_args(), that's why it is OK there, however, there could be another problem (since size is still declared as INT32).
struct array also uses INT32 for size member, so I am not sure how to proceed - I'll just commit a fix for f_allocate(), but if one day someone will decide to play around with huge values which don't fit in INT32, he will have a problem...
What I don't understand, though - this is why this problem doesn't exist when I don't use --with-rtldebug...
Regards, /Al