Regular malloc seems to fail too. This is now really confusing.

Steve

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] 
> Behalf Of
> Stephen Pick
> Sent: 16 February 2004 12:14
> To: Win32 GUI Hackers (E-mail)
> Subject: [perl-win32-gui-hackers] safemalloc() not safe?
> 
> 
> Hi,
> 
> Firstly - what on earth is safemalloc()? It seems to be 
> documented in old patches to the perl 5.005 API, but not since then.
> 
> Secondly - safemalloc() seems to fail when reserving space 
> for text label strings in the InsertItem function of 
> TreeView.xs. The samples/pmx.pl file distributed with the 
> Win32::GUI 665 PPM is a good example of the crash, just 
> comment out "use blib" at the start. It probably won't crash 
> on your machine (since I'm guessing this is dependent on 
> circumstance).
> 
> The crash varies. Sometimes it is a null pointer assignment 
> (memory at "0x0000000" could not be "written"). Sometimes it 
> is an access violation. I don't understand why safefree is 
> doing this, it's only allocating 3 or 4 bytes of RAM so it's 
> not like that's a problem. The line is:
> 
> pszText = (LPSTR) safemalloc(tlen);
> 
> tlen is defined OK.
> 
> Is there something that we should be using instead of 
> safemalloc() because safemalloc does not appear to be safe.
> 
> Steve
> 
> 
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id56&alloc_id438&op=ick
> _______________________________________________
> Perl-Win32-GUI-Hackers mailing list
> Perl-Win32-GUI-Hackers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers
> 

Reply via email to