Bug 195720 - source-highlight: error during regex processing
source-highlight: error during regex processing
Product: Fedora
Classification: Fedora
Component: source-highlight (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Reber
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2006-06-16 15:01 EDT by bkyoung
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-06-23 15:50:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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 15:01 EDT, bkyoung
no flags Details
fixed url lang file (115 bytes, text/plain)
2006-06-21 13:50 EDT, Lorenzo Bettini
no flags Details
file to test the bug fix (212 bytes, text/plain)
2006-06-21 13:52 EDT, Lorenzo Bettini
no flags Details
(hopefully) fixed fixed version (120 bytes, text/plain)
2006-06-22 10:02 EDT, Lorenzo Bettini
no flags Details
file to test the bug fix (235 bytes, text/plain)
2006-06-22 10:04 EDT, Lorenzo Bettini
no flags Details

  None (edit)
Description bkyoung 2006-06-16 15:01:55 EDT
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):

How reproducible:
Every time.

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

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:
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: error during regex processing
c_comment.lang:15: (/\*)
formatting: "/*" as comment
source-highlight: error during regex processing

BEGIN b.sh

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

int main() {
	return 0;


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 15:01:55 EDT
Created attachment 131072 [details]
Generate error script
Comment 2 Lorenzo Bettini 2006-06-21 13:50:27 EDT
Created attachment 131301 [details]
fixed url lang file
Comment 3 Lorenzo Bettini 2006-06-21 13:52:11 EDT
Created attachment 131302 [details]
file to test the bug fix
Comment 4 Lorenzo Bettini 2006-06-21 13:55:20 EDT

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 15:34:19 EDT

thanks for your fix. I will integrate it into a new release.
Comment 6 Adrian Reber 2006-06-21 15:47:43 EDT
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/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
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
make[1]: *** [all] Error 2
make[1]: Leaving directory

Comment 7 Lorenzo Bettini 2006-06-22 10:02:42 EDT
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 10:04:24 EDT
Created attachment 131353 [details]
file to test the bug fix

and here's the modified test file
Comment 9 Adrian Reber 2006-06-23 15:50:22 EDT
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 05:06:52 EDT
OK, so I assume that it didn't raise any other problems, did it?

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