Bug 195720 - source-highlight: error during regex processing
Summary: source-highlight: error during regex processing
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: source-highlight   
(Show other bugs)
Version: 5
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Adrian Reber
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-06-16 19:01 UTC by bkyoung
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-06-23 19:50:22 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Generate error script (421 bytes, text/plain)
2006-06-16 19:01 UTC, bkyoung
no flags Details
fixed url lang file (115 bytes, text/plain)
2006-06-21 17:50 UTC, Lorenzo Bettini
no flags Details
file to test the bug fix (212 bytes, text/plain)
2006-06-21 17:52 UTC, Lorenzo Bettini
no flags Details
(hopefully) fixed fixed version (120 bytes, text/plain)
2006-06-22 14:02 UTC, Lorenzo Bettini
no flags Details
file to test the bug fix (235 bytes, text/plain)
2006-06-22 14:04 UTC, Lorenzo Bettini
no flags Details

Description bkyoung 2006-06-16 19:01:55 UTC
Description of problem:
source-highlight: error during regex processing
Specific block of comment code from C source file causes error.

Version-Release number of selected component (if applicable):
source-highlight-2.3-1.fc5

How reproducible:
Every time.

Steps to Reproduce:
1. Run attached b.sh script.
2.
3.
  
Actual results:
Error.

Expected results:
Process the source file.

Additional info:
Problematic code from distribution supplied source file. Altering the source
files to avoid problem is not possible.

Output from running attached b.sh script:
BEGIN OUTPUT
GNU source-highlight 2.3
Copyright (C) 1999-2005 Lorenzo Bettini <bettini@gnu.org>
This program comes with ABSOLUTELY NO WARRANTY.
This is free software; you may redistribute copies of the program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
source-highlight-2.3-1.fc5
source-highlight: error during regex processing
FAILED
c_comment.lang:15: (/\*)
formatting: "/*" as comment
entering:
(\*/)|(/\*)|((?:(?:(?:<?)(?:[[:word:]]+)(?:[\.\-_][[:word:]]+)*@(?:[[:word:]]+)(?:[\.\-_][[:word:]]+)*(?:>?))))|((?:(?:[[:word:]]+://(?:[[:word:]]+[\./\-_]?)+)))|((?:(?:TODO|FIXME)(?:[:]?)))
source-highlight: error during regex processing
END OUTPUT

BEGIN b.sh
#!/bin/sh

cat > main.c <<EOF
/*  _________________________________________________________________
**
**  Utility Functions
**  _________________________________________________________________
*/

int main() {
	return 0;
}

EOF

runit() {
source-highlight --out-format html  main.c --gen-references=inline $1
}

source-highlight --version
rpm -qa | grep source-highlight
runit || { echo FAILED; runit --debug-lang; }

END b.sh

Comment 1 bkyoung 2006-06-16 19:01:55 UTC
Created attachment 131072 [details]
Generate error script

Comment 2 Lorenzo Bettini 2006-06-21 17:50:27 UTC
Created attachment 131301 [details]
fixed url lang file

Comment 3 Lorenzo Bettini 2006-06-21 17:52:11 UTC
Created attachment 131302 [details]
file to test the bug fix

Comment 4 Lorenzo Bettini 2006-06-21 17:55:20 UTC
Hi

I'm the author of GNU source-highlight

Indeed it's a problem with url.lang regular expressions.

I think I fixed it now; in the previous attachments you find the fixed version
and also a more involved test example (sorry but I still have to practice with
bugzilla, and I should've put altogether instead of three different messages :-)

I look forward to hearing feedback

Comment 5 Adrian Reber 2006-06-21 19:34:19 UTC
Lorenzo,

thanks for your fix. I will integrate it into a new release.

Comment 6 Adrian Reber 2006-06-21 19:47:43 UTC
it does not build for me with the new url.lang:

Processed ./Hello.java
../src/source-highlight --data-dir ../src/ -s java -f html  --style-file
../src/default.style  --line-number --doc -i ./Hello.java -o Hello_lines.html
../src/source-highlight --data-dir ../src/ -s java -f xhtml --doc -i
./Hello.java -o Hello_xhtml.html --css ./xhtml.css
../src/source-highlight --data-dir ../src/ -s java -f xhtml --doc -i
./Hello.java -o Hello_xhtml2.html --style-file ../src/default.style
../src/source-highlight --data-dir ../src/ -s cpp -f html --style-file
../src/default.style --doc --output-dir=../doc ../src/startapp.cc
../src/source-highlight --data-dir ../src/ -s cpp -f html --style-file
../src/default.style --doc --output-dir=../doc --css="./mono.css"
../src/lib/cmdline.h
../src/source-highlight --data-dir ../src/ -s flex -f html --style-file
../src/default.style --doc --output-dir=../doc ./flex_scanner.ll
Processed ./flex_scanner.ll
../src/source-highlight --data-dir ../src/ --style-file ../src/default.style -i
../src/langdef.lang -o langdef.lang.html
source-highlight: error during regex processing
make[3]: *** [startapp.cc.html] Error 1
make[3]: *** Waiting for unfinished jobs....
Processed ../src/lib/cmdline.h
make[3]: Leaving directory
`/home/adrian/devel/fedora/rpms/source-highlight/devel/source-highlight-2.3/doc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/adrian/devel/fedora/rpms/source-highlight/devel/source-highlight-2.3'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/home/adrian/devel/fedora/rpms/source-highlight/devel/source-highlight-2.3'



Comment 7 Lorenzo Bettini 2006-06-22 14:02:42 UTC
Created attachment 131352 [details]
(hopefully) fixed fixed version

sorry, I was too fast in releasing the fix :-(
this one, besides being more readable, should be the right one :-)

Comment 8 Lorenzo Bettini 2006-06-22 14:04:24 UTC
Created attachment 131353 [details]
file to test the bug fix

and here's the modified test file

Comment 9 Adrian Reber 2006-06-23 19:50:22 UTC
I have released new versions which include the new url.lang file for FC-4, FC-5
and FC-6.

Comment 10 Lorenzo Bettini 2006-06-24 09:06:52 UTC
OK, so I assume that it didn't raise any other problems, did it?
thanks
Lorenzo


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