Re: [fpc-pascal] ansistrings, exceptions, pascal call stack and access violations

2004-11-03 Thread David Emerson
Peter wrote: >The problem is that the call to the empty ansistring routine will create a >temp ansistring for the parameter. And ansistring variables or temps need >to be finalized. This call to finalize() destroyes the backtrace since it >writes at the same location in the stack that was also use

Re: [fpc-pascal] ansistrings, exceptions, pascal call stackand access violations

2004-11-03 Thread Peter Vreman
> Peter wrote: > >>The problem is that the call to the empty ansistring routine will create >> a >>temp ansistring for the parameter. And ansistring variables or temps need >>to be finalized. This call to finalize() destroyes the backtrace since it >>writes at the same location in the stack that wa

Re: [fpc-pascal] ansistrings, exceptions, pascal call stack and access violations

2004-11-03 Thread David Emerson
Compiling sysutils with -gl gave the call stack seen below... insightful, I suppose, but not necessarily useful ;) It definitely points to what Peter said about the ansistring finalize writing to the same place in the stack. Examining the stack, it seems that dump_stack calls get_caller_addr, a