I clearly was wrong in my previous message answering Damon's hints
as we are passing a structure address that is adjacent the object pointer.
David's bring more stuff to think about
David Welton wrote:
Tcl_FSStat sets off warning bells for me. I had problems with this
years ago: the Tcl stat struct and the Apache one were different
sizes, and they got mixed up during linking, meaning that a bit more
memory than was supposed to got overwritten. It was a very subtle and
Where Apache's stat structure comes into play in this case?
nasty bug because it was hard to trigger, and didn't manifest itself
right away in all cases.
That's one thing to investigate.
I had already checked the stack allocation using gdb:
sizeof(Tcl_StatBuf) returns
88. The stat structure and the pointer fnobj are 92 bytes apart, making room
for 4 extra bytes that guarantees nothing, unless you can exactly size
up the
real memory span handled by Tcl_FSStat for the stat struct. Obviously a
compilation
option mismatch could be the culprit even though I prepared the
debugging session
disabling the optimizer (usual -O0). I expected to see the segfault
disappear
in this case, but it wasn't enough. Clearly the Tcl library is handling the
structure in a different way.
-- Massimo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]