Vincent Snijders kirjoitti lauantai 26 helmikuu 2011 10:27:19:
It probably is some buffer overrun, at least that is more likely than
a bug in the heap manager.
WIthout sample source that can be compiled and run it is hard to draw
any conclusion form the heaptrc and I doubt that anybody can
Vincent Snijders kirjoitti lauantai 26 helmikuu 2011 10:27:19:
It probably is some buffer overrun, at least that is more likely than
a bug in the heap manager.
Replacing:
GetMem (fInputString, (Len + 1) * SizeOf (REChar));
with:
GetMem (fInputString, (Len + 2) * SizeOf (REChar));
in
Hi
I fixed a nasty memory corruption issue in r29667.
It happens when TRegExpr is passed an empty source file.
SearchFrm.pas has:
RE.InputString:=Src;
Then GetMem reserves only 1 byte of memory.
Then FreeMem causes a crash and Lazarus dies (in my machine, in certain
conditions):
Marked
The strange thing is that I experienced the crash only with QT bindings
although the problem has nothing to do with widget bindings.
Strange...
I bet most developers can't reproduce my findings (again).
I could not reproduce it myself on a mini-laptop. It may be a 64-bit issue.
Juha
--