[CWB] [ cwb-Bugs-3545042 ] Segmentation fault inCQP using sgml and hdr options

SourceForge.net noreply at sourceforge.net
Tue Jul 17 19:29:17 CEST 2012


Bugs item #3545042, was opened at 2012-07-17 05:54
Message generated for change (Comment added) made by andrewhardie
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=722303&aid=3545042&group_id=131809

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: CQP engine
Group: TODO-3.5
>Status: Closed
>Resolution: Fixed
Priority: 9
Private: No
Submitted By: ishalyminov ()
>Assigned to: Andrew Hardie (andrewhardie)
Summary: Segmentation fault inCQP using sgml and hdr options

Initial Comment:
cqp v3.4.4 with PrintMode sgml and PrintOptions hdr enabled crashes with core dump. Platform: Ubuntu 12.04 64 bits.
Here are the steps to reproduce it:
cqp -r <registry>
set PrintMode sgml;
set PrintOptions hdr;
[];

----------------------------------------------------------------------

>Comment By: Andrew Hardie (andrewhardie)
Date: 2012-07-17 10:29

Message:
I have tracked it down now and fixed it in SVN (commit 326, version bumped
to 3.4.5). 

Turned out the problem was <time.h> not being included (<sys/time.h> was
included, which *ought* to itself include <time.h>, but for whatever reason
this was not working out). This caused a segfault when ctime() was called
in the construction of the concordance header. I've added <time.h> to the
other output modes (ascii, latex, html) as the same bug would seem to be
present there.

----------------------------------------------------------------------

Comment By: Andrew Hardie (andrewhardie)
Date: 2012-07-17 08:47

Message:
OK, I have reproduced this. With debug = ALL, here's the last few lines of
output.


Stack now 0 3 9
Entering state 22
Next token is token ';' ()
Reducing stack by rule 230 (line 1211):
-> $$ = nterm ReStructure ()
Stack now 0 3 9 22
Entering state 84
Reducing stack by rule 17 (line 402):
   $1 = nterm CYCommand ()
   $2 = nterm ReStructure ()
Message:
	Command: UnnamedCorpusCommand
-> $$ = nterm UnnamedCorpusCommand ()
Stack now 0 3 9
Entering state 21
Reducing stack by rule 15 (line 396):
   $1 = nterm UnnamedCorpusCommand ()
-> $$ = nterm CorpusCommand ()
Stack now 0 3 9
Entering state 20
Next token is token ';' ()
Shifting token ';' ()
Entering state 82
Reducing stack by rule 6 (line 369):
   $1 = nterm $@2 ()
   $2 = nterm CorpusCommand ()
   $3 = token ';' ()
Segmentation fault


----------------------------------------------------------------------

Comment By: Andrew Hardie (andrewhardie)
Date: 2012-07-17 07:53

Message:
Did you select a corpus? I can't reproduce this on Ubuntu 11.04, when I set
those options and run a query without having selected a corpus, all I get
is the "No Corpus activated" error message.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=722303&aid=3545042&group_id=131809


More information about the CWB mailing list