2009/3/5 Alexandre Julliard <julli...@winehq.org>: > Rob Shearman <robertshear...@gmail.com> writes: > >> --- >> tools/widl/expr.c | 18 ++++---- >> tools/widl/header.c | 34 ++++++++++++++-- >> tools/widl/parser.y | 103 >> ++++++++++++++--------------------------------- >> tools/widl/typelib.c | 60 ++++++++++++++++------------ >> tools/widl/typetree.c | 31 ++++++++++++++ >> tools/widl/typetree.h | 37 +++++++++++++++++- >> tools/widl/widltypes.h | 29 +++++++++++++- >> 7 files changed, 200 insertions(+), 112 deletions(-) >> >> Shouldn't change any generated files. > > It crashes on 64-bit: > > ../tools/widl/widl -I../../wine64/include -I. -I../../wine64/include > -I../include -h -H activaut.h ../../wine64/include/activaut.idl > make[1]: *** [activaut.h] Segmentation fault (core dumped) > make[1]: Leaving directory `/home/julliard/wine/build/obj-elf64/include' > make: *** [include] Error 2 > wine:~/wine/build/obj-elf64-$ gdb tools/widl/widl include/core > GNU gdb 6.8-debian > Copyright (C) 2008 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "x86_64-linux-gnu"... > > warning: Can't read pathname for load map: Input/output error. > Reading symbols from /lib/libc.so.6...done. > Loaded symbols for /lib/libc.so.6 > Reading symbols from /lib/ld-linux-x86-64.so.2...done. > Loaded symbols for /lib64/ld-linux-x86-64.so.2 > Core was generated by `../tools/widl/widl -I../../wine64/include -I. > -I../../wine64/include -I../inclu'. > Program terminated with signal 11, Segmentation fault. > [New process 19396] > #0 0x000000000042bd2d in set_type (v=0x21b4b20, decl_spec=0x21b4ae0, > decl=0x21b0720, top=0) at ../../../wine64/tools/widl/parser.y:1369 > 1369 if (is_attr(type->attrs, ATTR_INLINE)) > (gdb) bt > #0 0x000000000042bd2d in set_type (v=0x21b4b20, decl_spec=0x21b4ae0, > decl=0x21b0720, top=0) at ../../../wine64/tools/widl/parser.y:1369 > #1 0x000000000042c697 in set_var_types (attrs=0x21b4aa0, > decl_spec=0x21b4ae0, decls=0x21b4c10) at > ../../../wine64/tools/widl/parser.y:1563 > #2 0x0000000000429736 in parser_parse () at > ../../../wine64/tools/widl/parser.y:705 > #3 0x000000000041fdd0 in main (argc=9, argv=0x7fff0037bc28) at > ../../../wine64/tools/widl/widl.c:632 > (gdb) p type > $1 = (type_t *) 0x100000000 > (gdb) p *decl_spec > $2 = {type = 0x100000000, attrs = 0x0, stgclass = STG_NONE} > (gdb)
Thanks for the info. Does the attached patch fix it? -- Rob Shearman
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c index 57a5736..961a3f1 100644 --- a/tools/widl/typetree.c +++ b/tools/widl/typetree.c @@ -102,7 +102,7 @@ type_t *type_new_basic(enum type_basic_type basic_type) type_t *type_new_int(enum type_basic_type basic_type, int sign) { - static type_t *int_types[TYPE_BASIC_INT_MAX][3]; + static type_t *int_types[TYPE_BASIC_INT_MAX][3] = { { NULL } }; assert(basic_type <= TYPE_BASIC_INT_MAX);