freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Optimizer problem? (FT2.3.7 + GCC4.2.3)


From: Ian Britten
Subject: Re: [ft] Optimizer problem? (FT2.3.7 + GCC4.2.3)
Date: Tue, 22 Jul 2008 15:44:38 -0300
User-agent: Thunderbird 2.0.0.12 (X11/20080305)

address@hidden wrote:

 1) Mandriva 2008.1, 32-bit
 2) Mandriva 2008.1, 64-bit

When I run our unit tests on box #1, they crash, down inside
FTC_CMapCache_Lookup()

Interesting. I wish if I could reproduce the problem.

I wish you could reproduce it too!  ;)

Is there maybe anything in any of the FT sample apps that would
get into this particular code?  I'm not too familiar with them, but
if there is, that'd be easier than trying to extract all the
relevant FT calls from my unit test (Which, I will have to do if I
can't find any other way to reproduce this...)

Do you think the problem can be reproduced on usual
i386 platforms? Or, the problem occurs in special case:
when i386 system is installed on amd64 platforms?
If usual i386 platform is sufficient, there might be
more bug reports...?

I don't think I'm doing anything unusual.  It's a stock 386
install on a dual "Intel(R) Pentium(R) 4 CPU 3.00GHz"  (I can
send the full /proc/cpuinfo output, if it'd help)

The only thing that surprised me was the GCC version and how
new it is (4.2 - I was using 3.4 before this).  Dunno if it's been
used much by (m)any FT users or maintainers, which was part of my
reason for posting...

On these boxes, I'm using the system-installed version of FT2.3.7,
which is obviously built optimized.  If I build a debug version of
FT, and relink my unit-test program against it, all problems go
away - No crash, no Valgrind errors.

Oh, please don't compare the prebuilt binaries of pc-unix
distributions (Linux, FreeBSD, etc) with the vanilla binaries
built by yourself. Usually pc-unix distributors apply the
patches and use special configurations (not only the optimization,
often patented hinter is selected). In the case of Mandriva,
you can find their source package (src.rpm) from somewhere.
If you want to compare, I recommend you to build 2 vanilla
FreeType2 libaries by yourself - with-optimization-and-without-debug,
and with-debug-and-without-optimization.

Ya, I'm quite familiar with all that, and glossed over some of
the details a bit.  However, the SRPM seems pretty benign, and
just ends up building FT with these options:
    -Wall -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
    -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer
    -march=i586 -mtune=generic -fasynchronous-unwind-tables

The only interesting thing I saw in the SRPM (Reinforcing my
suspicion that there may be an optimizer problem) was this
comment/tweak:
  if [ $GCC_VERSION -lt 34 ]; then
  #old gcc is generating wrong code with optimizations
  export CFLAGS="-O"
  fi

I'll try doing some different build combinations of FT, and see if
I can narrow my problem down any more

Anyway I'm interested in the bug you reported. When I had
a sparetime in August, I will try to reproduce.

I'm interested in it too, since it's interfering with my work! ;)
Thanks for any help/info!
Ian





reply via email to

[Prev in Thread] Current Thread [Next in Thread]