[fpc-devel] SYSUTILS UTF8String Memory Bug
mark diener
rpzrpzrpz at gmail.com
Mon Aug 11 15:58:39 CEST 2014
Jonas,
I ran heaptrc AND Dr memory and there are definitely some issues. I posted
a separate thread to focus on baseline Dr Memory errors for
lazarus/freepascal
One of my problems is the stack reported by the results.txt file shows the
same code point: rpzstring.pas:193.
Any ideas on how to improve the reported code location. I can promise you
that fpc_ansistr_setlength is not located in rpzstring.pas. It's in the
RTL!!!
Project compiled with CMEM, Dwarf2 (-gw2) and requested by Dr Memory docs.
Cheers,
marco
Error #62: POSSIBLE LEAK 26 direct bytes 0x05183f70-0x05183f8a + 0 indirect
bytes
# 0
replace_malloc
[d:\drmemory_package\common\alloc_replace.c:2320]
# 1
CMEM_CGETMEM$LONGWORD$$POINTER
[../rpzlib/rpzstring.pas:193]
# 2
SYSTEM_GETMEM$POINTER$LONGWORD
[../rpzlib/rpzstring.pas:193]
# 3
fpc_ansistr_setlength
[../rpzlib/rpzstring.pas:193]
# 4
LAZUTF8_UTF16TOUTF8$UNICODESTRING$$ANSISTRING
[../rpzlib/rpzstring.pas:193]
# 5
LCLPROC_UTF16TOUTF8$UTF16STRING$$ANSISTRING
[../rpzlib/rpzstring.pas:193]
# 6
WIN32PROC_GETCONTROLTEXT$LONGWORD$$ANSISTRING
[../rpzlib/rpzstring.pas:193]
# 7
WIN32WSSTDCTRLS_TWIN32WSCUSTOMEDIT_$__GETTEXT$TWINCONTROL$ANSISTRING$$BOOLEAN
[../rpzlib/rpzstring.pas:193]
# 8
CONTROLS_TWINCONTROL_$__REALGETTEXT$$TTRANSLATESTRING
[../rpzlib/rpzstring.pas:193]
# 9
CONTROLS_TCONTROL_$__GETTEXT$$TTRANSLATESTRING
[../rpzlib/rpzstring.pas:193]
#10
MAINFM_TFMMAIN_$__RXLISTENCLICK$TOBJECT
[C:/pdev/rpztestudphv//mainfm.pas:94]
#11
CONTROLS_TCONTROL_$__CLICK
[../rpzlib/rpzstring.pas:193]
On Sat, Aug 9, 2014 at 3:34 PM, Jonas Maebe <jonas.maebe at elis.ugent.be>
wrote:
> On 09/08/14 20:06, mark diener wrote:
>
>> So with the memory manager changed out, the exception now occurs in the
>> GUI main thread instead of the TThread and clearly the
>> fpc_ansistr_decr_ref function is failing.
>>
>> The lines in question in .\include\application.inc:1079 are as follows:
>>
>> // call event
>> Event(Data);
>>
>> This Event variable is a pointer to a function with a single pointer to
>> integer argument.
>>
>> Anybody got some ideas about this?
>>
>
> Your program probably contains a memory corruption bug that messes up the
> heap state. To find it, you can try enabling range and class type checking
> (-CRr) and enabling heaptrc (-gh), or using the C memory manager and
> running the program through Dr Memory (http://www.drmemory.org )
>
>
> Jonas
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140811/bbf30ad0/attachment.html>
More information about the fpc-devel
mailing list