[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index
From: |
Clemens Koller |
Subject: |
Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index |
Date: |
Sun, 10 Apr 2005 18:44:51 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910 |
Hello, Werner, Hi Christian!
First of all... thanks for your suggestions so far, I will
work my way through it asap. But can some of you please explain,
what FT_Get_Name_Index is intended to do? How is it called and
what data does it take?
I don't feel comfortable to change code I don't understand at all.
I spent some time with valgrind - a new prerelease of 2.4.0
is also available for ppc. Here is some verbose output:
address@hidden:~/newbuild/xc/programs/mkfontscale$ ls -l Type1
total 76
-rw-r--r-- 1 clemens users 75363 Apr 9 21:11 UTBI____.pfa
-rw-r--r-- 1 clemens users 0 Apr 10 17:52 fonts.scale
address@hidden:~/newbuild/xc/programs/mkfontscale$ valgrind --tool=memcheck -v
mkfontscale Type1
==2067== Memcheck, a memory error detector for ppc-linux.
==2067== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==2067== Using valgrind-2.4.0-ppc, a program supervision framework for
ppc-linux.
==2067== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==2067== Valgrind library directory: /usr/local/lib/valgrind
==2067== Command line
==2067== mkfontscale
==2067== Type1
==2067== Startup, with flags:
==2067== --tool=memcheck
==2067== -v
==2067== Contents of /proc/version:
==2067== Linux version 2.6.11.6 (address@hidden) (gcc version 3.4.3) #1 Mon
Apr 4 15:31:11 CEST 2005
==2067== Reading syms from /usr/X11R6/bin/mkfontscale (0x10000000)
==2067== Reading syms from /lib/ld-2.3.4.so (0x11870000)
==2067== Reading syms from /usr/local/lib/valgrind/stage2 (0x70000000)
==2067== Reading syms from /lib/ld-2.3.4.so (0x71000000)
==2067== Reading syms from /lib/libdl-2.3.4.so (0x7102F000)
==2067== Reading syms from /lib/libc-2.3.4.so (0x71043000)
==2067== Reading syms from /usr/local/lib/valgrind/vgskin_memcheck.so
(0x7128B000)
==2067== Reading suppressions file: /usr/local/lib/valgrind/default.supp
==2067==
==2067== Conditional jump or move depends on uninitialised value(s)
==2067== at 0x11872350: _dl_start (do-rel.h:104)
==2067== by 0x11880100: _start (dl-start.S:39)
==2067==
==2067== Conditional jump or move depends on uninitialised value(s)
==2067== at 0x11872380: _dl_start (do-rel.h:117)
==2067== by 0x11880100: _start (dl-start.S:39)
==2067==
==2067== Conditional jump or move depends on uninitialised value(s)
==2067== at 0x11871FB8: _dl_start_final (rtld.c:289)
==2067== by 0x11872420: _dl_start (rtld.c:533)
==2067== by 0x11880100: _start (dl-start.S:39)
==2067== Reading syms from /usr/local/lib/valgrind/vg_inject.so (0xFFDD000)
==2067==
==2067== Conditional jump or move depends on uninitialised value(s)
==2067== at 0x11881E4C: index (strchr.S:95)
==2067== by 0x1187711C: _dl_map_object (dl-load.c:1971)
==2067== by 0x11873C5C: dl_main (rtld.c:1138)
==2067== by 0x1187EEA4: _dl_sysdep_start (dl-sysdep.c:237)
==2067== by 0x11871FCC: _dl_start_final (rtld.c:308)
==2067== by 0x11872420: _dl_start (rtld.c:533)
==2067== by 0x11880100: _start (dl-start.S:39)
==2067== Reading syms from /usr/local/lib/valgrind/vgpreload_memcheck.so
(0xFFB5000)
==2067== Reading syms from /usr/X11R6/lib/libfontenc.so.1.0 (0xFF7F000)
==2067== Reading syms from /usr/lib/libfreetype.so.6.3.7 (0xFEE3000)
==2067== Reading syms from /lib/libc-2.3.4.so (0xFD8C000)
==2067== Reading syms from /lib/libdl-2.3.4.so (0xFD68000)
==2067== TRANSLATE: 0xFDFDC6C redirected to 0xFFB96D0
==2067== TRANSLATE: 0xFDFBBF0 redirected to 0xFFB9D6C
==2067== TRANSLATE: 0xFDFD870 redirected to 0xFFBA2EC
==2067==
==2067== Conditional jump or move depends on uninitialised value(s)
==2067== at 0xFE0195C: index (strchr.S:108)
==2067== by 0xFE50EBC: get_proc_path (getsysstats.c:68)
==2067== by 0xFE511D0: phys_pages_info (getsysstats.c:244)
==2067== by 0xFE22B84: sysconf (sysconf.c:631)
==2067== by 0xFDBFE94: qsort (msort.c:113)
==2067== by 0xFF2273C: t1_cmap_unicode_init (t1cmap.c:338)
==2067== by 0xFEFF700: FT_CMap_New (ftobjs.c:2278)
==2067== by 0xFF3A0A8: T1_Face_Init (t1objs.c:459)
==2067== by 0xFEFD77C: open_face (ftobjs.c:910)
==2067== by 0xFEFE1FC: FT_Open_Face (ftobjs.c:1619)
==2067== by 0xFEFED80: FT_New_Face (ftobjs.c:970)
==2067== by 0x10003784: doDirectory (in /usr/X11R6/bin/mkfontscale)
==2067== TRANSLATE: 0xFE038A0 redirected to 0xFFBB71C
==2067== TRANSLATE: 0xFDFE524 redirected to 0xFFBA3E0
==2067==
==2067== Invalid read of size 4
==2067== at 0xFE02138: strlen (strlen.S:128)
==2067== by 0xFDF2B28: vsnprintf (vsnprintf.c:120)
==2067== by 0xFDD7AB4: snprintf (snprintf.c:35)
==2067== by 0x10003974: doDirectory (in /usr/X11R6/bin/mkfontscale)
==2067== by 0x1000445C: main (in /usr/X11R6/bin/mkfontscale)
==2067== Address 0x118FE87C is 3 bytes after a block of size 41 alloc'd
==2067== at 0xFFB9770: malloc (vg_replace_malloc.c:130)
==2067== by 0x10004E44: listConsF (in /usr/X11R6/bin/mkfontscale)
==2067== by 0x10003234: makeXLFD (in /usr/X11R6/bin/mkfontscale)
==2067== by 0x10004054: doDirectory (in /usr/X11R6/bin/mkfontscale)
==2067== by 0x1000445C: main (in /usr/X11R6/bin/mkfontscale)
==2067==
==2067== Conditional jump or move depends on uninitialised value(s)
==2067== at 0xFEFF96C: FT_Get_Name_Index (ftobjs.c:2395)
==2067== by 0x10004020: doDirectory (in /usr/X11R6/bin/mkfontscale)
==2067== by 0x1000445C: main (in /usr/X11R6/bin/mkfontscale)
==2067==
==2067== Use of uninitialised value of size 4
==2067== at 0xFEFF970: FT_Get_Name_Index (ftobjs.c:2395)
==2067== by 0x10004020: doDirectory (in /usr/X11R6/bin/mkfontscale)
==2067== by 0x1000445C: main (in /usr/X11R6/bin/mkfontscale)
unrecognized PowerPC instruction: 0
at 0x11A47818: ???
==2067==
==2067== Process terminating with default action of signal 4 (SIGILL)
==2067== Illegal opcode at address 0x70092658
==2067== at 0x11A47818: ???
==2067== by 0x10004020: doDirectory (in /usr/X11R6/bin/mkfontscale)
==2067== by 0x1000445C: main (in /usr/X11R6/bin/mkfontscale)
==2067==
==2067== ERROR SUMMARY: 11 errors from 8 contexts (suppressed: 2 from 1)
==2067==
==2067== 1 errors in context 1 of 8:
==2067== Use of uninitialised value of size 4
==2067== at 0xFEFF970: FT_Get_Name_Index (ftobjs.c:2395)
==2067== by 0x10004020: doDirectory (in /usr/X11R6/bin/mkfontscale)
==2067== by 0x1000445C: main (in /usr/X11R6/bin/mkfontscale)
==2067==
==2067== 1 errors in context 2 of 8:
==2067== Conditional jump or move depends on uninitialised value(s)
==2067== at 0xFEFF96C: FT_Get_Name_Index (ftobjs.c:2395)
==2067== by 0x10004020: doDirectory (in /usr/X11R6/bin/mkfontscale)
==2067== by 0x1000445C: main (in /usr/X11R6/bin/mkfontscale)
==2067==
==2067== 1 errors in context 3 of 8:
==2067== Conditional jump or move depends on uninitialised value(s)
==2067== at 0xFE0195C: index (strchr.S:108)
==2067== by 0xFE50EBC: get_proc_path (getsysstats.c:68)
==2067== by 0xFE511D0: phys_pages_info (getsysstats.c:244)
==2067== by 0xFE22B84: sysconf (sysconf.c:631)
==2067== by 0xFDBFE94: qsort (msort.c:113)
==2067== by 0xFF2273C: t1_cmap_unicode_init (t1cmap.c:338)
==2067== by 0xFEFF700: FT_CMap_New (ftobjs.c:2278)
==2067== by 0xFF3A0A8: T1_Face_Init (t1objs.c:459)
==2067== by 0xFEFD77C: open_face (ftobjs.c:910)
==2067== by 0xFEFE1FC: FT_Open_Face (ftobjs.c:1619)
==2067== by 0xFEFED80: FT_New_Face (ftobjs.c:970)
==2067== by 0x10003784: doDirectory (in /usr/X11R6/bin/mkfontscale)
==2067==
==2067== 1 errors in context 4 of 8:
==2067== Conditional jump or move depends on uninitialised value(s)
==2067== at 0x11881E4C: index (strchr.S:95)
==2067== by 0x1187711C: _dl_map_object (dl-load.c:1971)
==2067== by 0x11873C5C: dl_main (rtld.c:1138)
==2067== by 0x1187EEA4: _dl_sysdep_start (dl-sysdep.c:237)
==2067== by 0x11871FCC: _dl_start_final (rtld.c:308)
==2067== by 0x11872420: _dl_start (rtld.c:533)
==2067== by 0x11880100: _start (dl-start.S:39)
==2067==
==2067== 1 errors in context 5 of 8:
==2067== Conditional jump or move depends on uninitialised value(s)
==2067== at 0x11871FB8: _dl_start_final (rtld.c:289)
==2067== by 0x11872420: _dl_start (rtld.c:533)
==2067== by 0x11880100: _start (dl-start.S:39)
==2067==
==2067== 2 errors in context 6 of 8:
==2067== Invalid read of size 4
==2067== at 0xFE02138: strlen (strlen.S:128)
==2067== by 0xFDF2B28: vsnprintf (vsnprintf.c:120)
==2067== by 0xFDD7AB4: snprintf (snprintf.c:35)
==2067== by 0x10003974: doDirectory (in /usr/X11R6/bin/mkfontscale)
==2067== by 0x1000445C: main (in /usr/X11R6/bin/mkfontscale)
==2067== Address 0x118FE87C is 3 bytes after a block of size 41 alloc'd
==2067== at 0xFFB9770: malloc (vg_replace_malloc.c:130)
==2067== by 0x10004E44: listConsF (in /usr/X11R6/bin/mkfontscale)
==2067== by 0x10003234: makeXLFD (in /usr/X11R6/bin/mkfontscale)
==2067== by 0x10004054: doDirectory (in /usr/X11R6/bin/mkfontscale)
==2067== by 0x1000445C: main (in /usr/X11R6/bin/mkfontscale)
==2067==
==2067== 2 errors in context 7 of 8:
==2067== Conditional jump or move depends on uninitialised value(s)
==2067== at 0x11872380: _dl_start (do-rel.h:117)
==2067== by 0x11880100: _start (dl-start.S:39)
==2067==
==2067== 2 errors in context 8 of 8:
==2067== Conditional jump or move depends on uninitialised value(s)
==2067== at 0x11872350: _dl_start (do-rel.h:104)
==2067== by 0x11880100: _start (dl-start.S:39)
--2067--
--2067-- supp: 2 dl_relocate_object
==2067==
==2067== IN SUMMARY: 11 errors from 8 contexts (suppressed: 2 from 1)
==2067==
==2067== malloc/free: in use at exit: 601263 bytes in 383 blocks.
==2067== malloc/free: 1099 allocs, 716 frees, 1499588 bytes allocated.
==2067==
==2067== searching for pointers to 383 not-freed blocks.
==2067== checked 825928 bytes.
==2067==
==2067== LEAK SUMMARY:
==2067== definitely lost: 135447 bytes in 12 blocks.
==2067== possibly lost: 0 bytes in 0 blocks.
==2067== still reachable: 465816 bytes in 371 blocks.
==2067== suppressed: 0 bytes in 0 blocks.
==2067== Use --leak-check=full to see details of leaked memory.
--2067-- TT/TC: 0 tc sectors discarded.
--2067-- 5695 tt_fast misses.
--2067-- translate: new 5590 (119892 -> 2185592; ratio 182:10)
--2067-- discard 151 (1044 -> 8240; ratio 78:10).
--2067-- chainings: 4333 chainings, 79 unchainings.
--2067-- dispatch: 7265155 jumps (bb entries); of them 548815 (7%) unchained.
--2067-- 146/7943 major/minor sched events.
--2067-- reg-alloc: 249 t-req-spill, 329911+1302 orig+spill uis,
--2067-- 28652 total-reg-rank
--2067-- sanity: 147 cheap, 6 expensive checks.
--2067-- 27741 calls generated, 15307 of them conditional
Illegal instruction
Okay, I will try to dig more into the code... get rid of the macro
and back to non typedef'd code.
I guess I remember that FT_Get_Name_Index crashes only (or the
first time) when a certain argument is given "ct"(?)
Greets,
Clemens
Werner LEMBERG wrote:
Well, about a year ago, we/you have had problems when building X11
that mkfontscale crashes while processing Type1 fonts with an
illegal instruction on powerpc. This was described several times in
the archives, but I cannot find a bugfix for that problem.
Unfortunately, nothing has changed. We don't use a powerpc at all.
This only happens with the Type1 fonts (the others build fine!) My
host is a embedded PowerPC from Freescale (MPC8540, e500 core, no
fpu)
Have you tried the current CVS? I've added some boundary checks to
the type1 driver (but I don't think this is the cause of the problem).
Could you try to run valgrind on the process? It seems that there is
a port to the PPC architecture... Maybe this provides a more
meaningful result.
Recent gdb versions allow to debug C macros also. Have you tried
this? Otherwise, what happens if you convert FT_FACE_LOOKUP_SERVICE
from a macro to a function?
To isolate it for the first step it's sufficient to only build
mkfontscale within <...>/xc/programs/mkfontscale
and then call it with mkfontscale Type1 (as already mentioned)
I've just run mkfontscale on my x86 GNU/Linux box, and I got no error
from valgrind.
BTW, what about the FreeType demo programs? Can you make them crash?
So, the first basic question: Is the above code okay? Is the stack
just trashed?
I have no idea, sorry. My knowledge of assembler code is zero. Maybe
David can help.
Werner
--
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany
http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19
- [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index, Clemens Koller, 2005/04/09
- Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index, Werner LEMBERG, 2005/04/10
- Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index,
Clemens Koller <=
- Message not available
- Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index (worksforme), Clemens Koller, 2005/04/11
- Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index(worksforme), Christian Demmer, 2005/04/11
- Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index (worksforme), Behdad Esfahbod, 2005/04/11
- Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index (worksforme), Werner LEMBERG, 2005/04/13
- Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index (worksforme), Behdad Esfahbod, 2005/04/13
- Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index (worksforme), Werner LEMBERG, 2005/04/13
- Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index (worksforme), Behdad Esfahbod, 2005/04/14
- Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index (worksforme), Werner LEMBERG, 2005/04/14
- Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index (worksforme), Behdad Esfahbod, 2005/04/14
- Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index (worksforme), Behdad Esfahbod, 2005/04/15