[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] FW: Stack Overflow ?
From: |
Chuck Burfoot |
Subject: |
[ft-devel] FW: Stack Overflow ? |
Date: |
Sat, 22 Mar 2014 14:32:29 -0500 |
(This is resend as I did an earlier direct response)
Think I found it.
I tried 'relaxing' the release build optimizations all the way back to the
debug settings.
No difference
So I analyzed how the memory was allocated. I realized that EVERYTHING was
alloced from ft_alloc(memory, size) so I substituted ft_scalloc(size,1) for
ft_smalloc ...
Presto bingo - everything seems to be JUST FINE
It's the Microsoft (and sometimes Linux or Mac) uninitialized memory error.
MY SUGGESTION would be to ADD a check for Win32 and mod that function
#ifdef USING_WINDOWS // defined(_WIN32) || defined( _WIN64)
return ft_scalloc(size,1);
#else
return ft_smalloc(size);
#endif
Or just use ft_scalloc ...
THIS is one of the dirtiest issues in release builds with Visual Studio -
indeterminate state of allocated memory AND can be especially insidious when
it's a variable on the stack
FYI
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Werner LEMBERG
Sent: Saturday, March 22, 2014 12:00 AM
To: address@hidden
Cc: address@hidden
Subject: Re: [ft-devel] Stack Overflow ?
> Release sample exception in FT_New_Face
>
> Top of ft_fseek()
>
> Looks like a corrupt stack ?
This is not sufficient information. There are no known issues with
FT_New_Face, so please give more details. Note that I don't use Windows, so
the best method to make me help you is to create a minimum, stand-alone,
portable test program that I can compile and run on the command line (i.e., a
program that doesn't include Windows-specific header files), and that exhibits
the problem you've encountered. Note that you should *not* send proprietary
fonts to this list in case you need them to reproduce the issue. Instead, you
might send them to me privately.
It's also possible that the `.sln' files from FreeType are incorrect – I simply
update them with regular expressions, not doing any validity tests.
Werner