Bug 451513 - texlive - lacheck segfaults
Summary: texlive - lacheck segfaults
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: texlive
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-15 05:25 UTC by Michal Jaegermann
Modified: 2013-07-02 23:30 UTC (History)
2 users (show)

Fixed In Version: 2007-46.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-13 02:24:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
A file which trips lacheck (3.56 KB, text/plain)
2008-06-15 05:25 UTC, Michal Jaegermann
no flags Details
patch to fix the reported crash (758 bytes, patch)
2009-10-04 02:46 UTC, Michal Jaegermann
no flags Details | Diff

Description Michal Jaegermann 2008-06-15 05:25:47 UTC
Description of problem:

When running on attached file, which is really a test file
for 'chktex' and messed up on purpose, then results are as follows:
....
"Test.tex", line 185: <- unmatched "end of file Test.tex"
"Test.tex", line 59: -> unmatched "\begin{dobedo}"
Segmentation fault (core dumped)

With texlive-debuginfo loaded gdb gives the following:

Program received signal SIGSEGV, Segmentation fault.
0x000000000040154b in f_checkend (name=0x2075260 "Test.tex") at ./lacheck.lex:1074
1074            {
Missing separate debuginfos, use: debuginfo-install glibc.x86_64
(gdb) where
#0  0x000000000040154b in f_checkend (name=0x2075260 "Test.tex") at
./lacheck.lex:1074
#1  0x00000000004055da in main (argc=<value optimized out>, argv=0x7fff9ac39148)
    at ./lacheck.lex:803
(gdb) l 1066,1082
1066    void f_checkend(name)
1067    char *name;
1068    {
1069        if ( check_top_level_end(name,3) == 1 )
1070         {
1071           if (  CG_TYPE != 3  ||  strcmp( CG_NAME, name ) != 0 )
1072
1073            while( CG_TYPE != 3  )
1074            {
1075              print_bad_match(name,3);
1076              pop();
1077            }
1078
1079             pop();
1080         }
1081    }
1082
(gdb) up
#1  0x00000000004055da in main (argc=<value optimized out>, argv=0x7fff9ac39148)
    at ./lacheck.lex:803
803                      }
(gdb) l
798                      if ((yyin = fopen( file_name, "r")) != NULL )
799                      {
800                          push(file_name, 3, 1);
801                          yylex();
802                          f_checkend(file_name);
803                      }
804                      else
805                          fprintf(stderr,
806                                  "%s: Could not open : %s\n",PROGNAME, argv[1]);
807                  }

'chktex' goes through the whole file with no issues although
"saner" files do not seem to create problems for 'lacheck' too.

Version-Release number of selected component (if applicable):
texlive-2007-30.fc9

How reproducible:
always

Comment 1 Michal Jaegermann 2008-06-15 05:25:47 UTC
Created attachment 309386 [details]
A file which trips lacheck

Comment 2 Jindrich Novy 2008-08-27 13:51:33 UTC
Should be fixed in rawhide CVS. It should occur in the next F9 update.

Comment 3 Jindrich Novy 2008-10-15 10:07:42 UTC
Please test the following update if you have a while:
https://admin.fedoraproject.org/updates/texlive-2007-32.fc9,texlive-texmf-2007-24.fc9

It should finally fix this and couple of other issues :)

Comment 4 Michal Jaegermann 2008-10-20 19:31:12 UTC
Something does not compute, at least on rawhide.

$ rpm -qf /usr/bin/lacheck
texlive-latex-2007-35.fc10.x86_64
$  rpm -qvlf $(which lacheck ) | grep lacheck
-rwxr-xr-x    1 root    root                    60088 Aug 27 08:14 /usr/bin/lacheck
-rw-r--r--    1 root    root                     1960 Aug 27 08:14 /usr/share/man/man1/lacheck.1.gz
$ rpm -qf --changelog /usr/bin/lacheck
* Wed Aug 27 2008 Jindrich Novy <jnovy> - 2007-35
- texlive-context requires texlive-texmf-context (#455163)
- fix lacheck to not to segfault (#451513)
    ^^^^^^
- rediff some patchesto be applicable with zero fuzz
......

$ lacheck  ~michal/src/Test.tex
.....
"/home/michal/src/Test.tex", line 59: -> unmatched "\begin{dobedo}"
Segmentation fault (core dumped)

This does not appear work too well.

Comment 5 Fedora Update System 2008-10-20 20:29:50 UTC
texlive-texmf-2007-24.fc9, texlive-2007-32.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update texlive-texmf texlive'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8931

Comment 6 Jindrich Novy 2008-10-21 06:24:22 UTC
Michal, could you please attach here the Test.tex file?

Comment 7 Michal Jaegermann 2008-10-21 16:38:59 UTC
I already did.  https://bugzilla.redhat.com/attachment.cgi?id=309386
attachment to this report caused segfault as described in comment #4.

Comment 8 Michal Jaegermann 2008-10-21 19:50:01 UTC
Today texlive-latex-2007-32.fc9.x86_64 showed up in "testing" and I got the
same "Program terminated with signal 11, Segmentation fault." from lacheck with the same backtrace like in the original report.

The only difference is that /usr/bin/lacheck now sports "2008-10-14 07:55" timestamp.

Comment 9 Fedora Update System 2008-11-21 10:58:45 UTC
texlive-texmf-2007-24.fc9, texlive-2007-32.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Michal Jaegermann 2008-11-21 16:48:56 UTC
I do not understand comment #9. Already on  2008-10-21 I noted that the bug is NOT fixed at all.  Is any purpose in "testing" repository if results are disregarded?

As a matter of fact lacheck from texlive-latex-2007-35.fc10 bombs out precisely as described too and I would be really surprised if texlive-latex-2007-39.fc11 would be different in this aspect although I did not look at that one so far. The bug indeed appears to be of a low priority but it is still there.

Comment 11 Bug Zapper 2009-06-10 01:37:47 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 12 Michal Jaegermann 2009-06-14 17:57:34 UTC
Here we go:
$ lacheck Test.tex
....
"Test.tex", line 59: -> unmatched "\begin{dobedo}"
Segmentation fault (core dumped)

Core was generated by `lacheck Test.tex'.
Program terminated with signal 11, Segmentation fault.

'lacheck' from texlive-latex-2007-43.fc12.x86_64.

Comment 13 Michal Jaegermann 2009-10-04 02:46:40 UTC
Created attachment 363583 [details]
patch to fix the reported crash

The second hunk of an attached patch is possibly already a paranoia.  If only the second hunk is applied then one gets "Stack underflow" report.  lacheck segfaults as CG_... macros in printf() when gstackp is 0 access gstack array out of bounds (gstackp-1 is used as an index).

Comment 14 Fedora Update System 2009-10-21 19:08:11 UTC
texlive-2007-45.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/texlive-2007-45.fc12

Comment 15 Fedora Update System 2009-10-21 19:09:41 UTC
texlive-2007-45.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/texlive-2007-45.fc11

Comment 16 Fedora Update System 2009-10-21 19:11:29 UTC
texlive-2007-45.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/texlive-2007-45.fc10

Comment 17 Fedora Update System 2009-10-27 06:31:08 UTC
texlive-2007-46.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update texlive'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-10730

Comment 18 Fedora Update System 2009-10-27 07:25:31 UTC
texlive-2007-46.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update texlive'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-10857

Comment 19 Fedora Update System 2009-11-13 02:23:52 UTC
texlive-2007-46.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2009-11-13 02:25:19 UTC
texlive-2007-46.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.