Date: Fri, 18 Apr 2008 00:07:10 +0200 (CEST) From: Roland Smith <rsmith@xs4all.nl> To: FreeBSD-gnats-submit@FreeBSD.org Cc: thierry@FreeBSD.org Subject: ports/122873: [PATCH] textproc/aspell 0.60.6 dumps core checking a TeX file. Message-ID: <20080417220710.5F569B829@slackbox.xs4all.nl> Resent-Message-ID: <200804172210.m3HMA0Ne091144@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080417220710.5F569B829>