From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Apr 17 22:10:01 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47D611065671 for ; Thu, 17 Apr 2008 22:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1ED108FC2C for ; Thu, 17 Apr 2008 22:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m3HMA054091145 for ; Thu, 17 Apr 2008 22:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m3HMA0Ne091144; Thu, 17 Apr 2008 22:10:00 GMT (envelope-from gnats) Resent-Date: Thu, 17 Apr 2008 22:10:00 GMT Resent-Message-Id: <200804172210.m3HMA0Ne091144@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Roland Smith Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CE8F106566C for ; Thu, 17 Apr 2008 22:07:13 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr2.xs4all.nl (smtp-vbr2.xs4all.nl [194.109.24.22]) by mx1.freebsd.org (Postfix) with ESMTP id A28118FC2E for ; Thu, 17 Apr 2008 22:07:12 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr2.xs4all.nl (8.13.8/8.13.8) with ESMTP id m3HM7AWX064872; Fri, 18 Apr 2008 00:07:11 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 5F569B829; Fri, 18 Apr 2008 00:07:10 +0200 (CEST) Message-Id: <20080417220710.5F569B829@slackbox.xs4all.nl> Date: Fri, 18 Apr 2008 00:07:10 +0200 (CEST) From: Roland Smith To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: thierry@FreeBSD.org Subject: ports/122873: [PATCH] textproc/aspell 0.60.6 dumps core checking a TeX file. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Roland Smith List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2008 22:10:01 -0000 >Number: 122873 >Category: ports >Synopsis: [PATCH] textproc/aspell 0.60.6 dumps core checking a TeX file. >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 17 22:10:00 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Roland Smith >Release: FreeBSD 7.0-STABLE amd64 >Organization: >Environment: System: FreeBSD slackbox.xs4all.nl 7.0-STABLE FreeBSD 7.0-STABLE #0: Fri Feb 29 01:45:32 CET 2008 rsmith@slackbox.xs4all.nl:/usr/obj/usr/src/sys/RFS amd64 >Description: When trying to spell a TeX file aspell dumped core, complaining that the configuration symbol 'f-tex-command' was not defined. Some digging around turned out that the script gen/mk-static-filter.pl is broken. It generates an incorrect gen/static_filters.src.cpp. Specifically, the variables pointing to the first and last members of arrays are not set correctly (first and last both point to the beginning of the array, even for non-empty arrays!). As a workaround I have included a patch that makes mk-static-filter.pl return immediately, and includes a correct static_filters.src.cpp. :-) >How-To-Repeat: Run aspell -t on a file. It will dump core. >Fix: ------ patch for textproc/aspell ------ diff -ruN aspell.orig/files/patch-gen::mk-static-filter.pl aspell/files/patch-gen::mk-static-filter.pl --- aspell.orig/files/patch-gen::mk-static-filter.pl 1970-01-01 01:00:00.000000000 +0100 +++ aspell/files/patch-gen::mk-static-filter.pl 2008-04-17 23:41:20.000000000 +0200 @@ -0,0 +1,7 @@ +--- gen/mk-static-filter.pl.orig 2008-04-17 23:37:13.000000000 +0200 ++++ gen/mk-static-filter.pl 2008-04-17 23:38:53.000000000 +0200 +@@ -1,3 +1,4 @@ ++exit 0; + # + #unmask dots and mask quotation marks and backslashes + sub prep_str($) diff -ruN aspell.orig/files/patch-gen::static_filters.src.cpp aspell/files/patch-gen::static_filters.src.cpp --- aspell.orig/files/patch-gen::static_filters.src.cpp 1970-01-01 01:00:00.000000000 +0100 +++ aspell/files/patch-gen::static_filters.src.cpp 2008-04-17 23:44:08.000000000 +0200 @@ -0,0 +1,220 @@ +--- gen/static_filters.src.cpp.orig 2008-04-17 23:42:39.000000000 +0200 ++++ gen/static_filters.src.cpp 2008-04-17 23:31:16.000000000 +0200 +@@ -0,0 +1,217 @@ ++/*File generated during static filter build ++ Automatically generated file ++*/ ++ ++ extern "C" IndividualFilter * new_aspell_email_filter(); ++ ++ extern "C" IndividualFilter * new_aspell_html_decoder(); ++ ++ extern "C" IndividualFilter * new_aspell_html_filter(); ++ ++ extern "C" IndividualFilter * new_aspell_sgml_decoder(); ++ ++ extern "C" IndividualFilter * new_aspell_sgml_filter(); ++ ++ extern "C" IndividualFilter * new_aspell_context_filter(); ++ ++ extern "C" IndividualFilter * new_aspell_url_filter(); ++ ++ extern "C" IndividualFilter * new_aspell_nroff_filter(); ++ ++ extern "C" IndividualFilter * new_aspell_tex_filter(); ++ ++ extern "C" IndividualFilter * new_aspell_texinfo_filter(); ++ ++ static FilterEntry standard_filters[8] = { ++ {"email",0,new_aspell_email_filter,0}, ++ {"html",new_aspell_html_decoder,new_aspell_html_filter,0}, ++ {"sgml",new_aspell_sgml_decoder,new_aspell_sgml_filter,0}, ++ {"context",0,new_aspell_context_filter,0}, ++ {"url",0,new_aspell_url_filter,0}, ++ {"nroff",0,new_aspell_nroff_filter,0}, ++ {"tex",0,new_aspell_tex_filter,0}, ++ {"texinfo",0,new_aspell_texinfo_filter,0} ++ }; ++ ++ const unsigned int standard_filters_size = 8; ++ ++ ++ static KeyInfo email_options[] = { ++ { ++ "f-email-quote", ++ KeyInfoList, ++ ">:|", ++ "email quote characters" ++ }, ++ { ++ "f-email-margin", ++ KeyInfoInt, ++ "10", ++ "num chars that can appear before the quote char" ++ } ++ }; ++ ++ const KeyInfo * email_options_begin = email_options; ++ ++ const KeyInfo * email_options_end = email_options+1; ++ ++ static KeyInfo html_options[] = { ++ { ++ "f-html-skip", ++ KeyInfoList, ++ "script:style", ++ "HTML tags to always skip the contents of" ++ }, ++ { ++ "f-html-check", ++ KeyInfoList, ++ "alt", ++ "HTML attributes to always check" ++ } ++ }; ++ ++ const KeyInfo * html_options_begin = html_options; ++ ++ const KeyInfo * html_options_end = html_options+1; ++ ++ static KeyInfo sgml_options[] = { ++ { ++ "f-sgml-skip", ++ KeyInfoList, ++ "", ++ "SGML tags to always skip the contents of" ++ }, ++ { ++ "f-sgml-check", ++ KeyInfoList, ++ "", ++ "SGML attributes to always check" ++ } ++ }; ++ ++ const KeyInfo * sgml_options_begin = sgml_options; ++ ++ const KeyInfo * sgml_options_end = sgml_options+1; ++ ++ static KeyInfo context_options[] = { ++ { ++ "f-context-delimiters", ++ KeyInfoList, ++ "\" \":/* */:// 0", ++ "context delimiters (separated by spaces)" ++ }, ++ { ++ "f-context-visible-first", ++ KeyInfoBool, ++ "false", ++ "swaps visible and invisible text" ++ } ++ }; ++ ++ const KeyInfo * context_options_begin = context_options; ++ ++ const KeyInfo * context_options_end = context_options+1; ++ ++ static KeyInfo url_options[] = { ++ ++ }; ++ ++ const KeyInfo * url_options_begin = url_options; ++ ++ const KeyInfo * url_options_end = url_options; ++ ++ static KeyInfo nroff_options[] = { ++ ++ }; ++ ++ const KeyInfo * nroff_options_begin = nroff_options; ++ ++ const KeyInfo * nroff_options_end = nroff_options; ++ ++ static KeyInfo tex_options[] = { ++ { ++ "f-tex-check-comments", ++ KeyInfoBool, ++ "false", ++ "check TeX comments" ++ }, ++ { ++ "f-tex-command", ++ KeyInfoList, ++ "addtocounter pp:addtolength pp:alpha p:arabic p:fnsymbol p:roman p:stepcounter p:setcounter pp:usecounter p:value p:newcounter po:refstepcounter p:label p:pageref p:ref p:newcommand poOP:renewcommand poOP:newenvironment poOPP:renewenvironment poOPP:newtheorem poPo:newfont pp:documentclass op:usepackage op:begin po:end p:setlength pp:addtolength pp:settowidth pp:settodepth pp:settoheight pp:enlargethispage p:hyphenation p:pagenumbering p:pagestyle p:addvspace p:framebox ooP:hspace p:vspace p:makebox ooP:parbox ooopP:raisebox pooP:rule opp:sbox pO:savebox pooP:usebox p:include p:includeonly p:input p:addcontentsline ppP:addtocontents pP:fontencoding p:fontfamily p:fontseries p:fontshape p:fontsize pp:usefont pppp:documentstyle op:cite p:nocite p:psfig p:selectlanguage p:includegraphics op:bibitem op:geometry p", ++ "TeX commands" ++ } ++ }; ++ ++ const KeyInfo * tex_options_begin = tex_options; ++ ++ const KeyInfo * tex_options_end = tex_options+2; ++ ++ static KeyInfo texinfo_options[] = { ++ { ++ "f-texinfo-ignore", ++ KeyInfoList, ++ "setfilename:syncodeindex:documentencoding:vskip:code:kbd:key:samp:verb:var:env:file:command:option:url:uref:email:verbatiminclude:xref:ref:pxref:inforef:c", ++ "Texinfo commands to ignore the parameters of" ++ }, ++ { ++ "f-texinfo-ignore-env", ++ KeyInfoList, ++ "example:smallexample:verbatim:lisp:smalllisp:small:display:snalldisplay:format:smallformat", ++ "Texinfo environments to ignore" ++ } ++ }; ++ ++ const KeyInfo * texinfo_options_begin = texinfo_options; ++ ++ const KeyInfo * texinfo_options_end = texinfo_options+2; ++ ++ ++ static ConfigModule filter_modules[] = { ++ { ++ "email",0, ++ "filter for skipping quoted text in email messages", ++ email_options_begin,email_options_end ++ }, ++ { ++ "html",0, ++ "filter for dealing with HTML documents", ++ html_options_begin,html_options_end ++ }, ++ { ++ "sgml",0, ++ "filter for dealing with generic SGML/XML documents", ++ sgml_options_begin,sgml_options_end ++ }, ++ { ++ "context",0, ++ "experimental filter for hiding delimited contexts", ++ context_options_begin,context_options_end ++ }, ++ { ++ "url",0, ++ "filter to skip URL like constructs", ++ url_options_begin,url_options_end ++ }, ++ { ++ "nroff",0, ++ "filter for dealing with Nroff documents", ++ nroff_options_begin,nroff_options_end ++ }, ++ { ++ "tex",0, ++ "filter for dealing with TeX/LaTeX documents", ++ tex_options_begin,tex_options_end ++ }, ++ { ++ "texinfo",0, ++ "filter for dealing with Texinfo documents", ++ texinfo_options_begin,texinfo_options_end ++ } ++ }; ++ ++ const ConfigModule * filter_modules_begin = filter_modules; ++ ++ const ConfigModule * filter_modules_end = filter_modules+7; ++ ++ const size_t filter_modules_size = 8; ------ patch for textproc/aspell ------ >Release-Note: >Audit-Trail: >Unformatted: