[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#500987: kjs: javascript RegExp doesn't work with <libpcre3-7.7



Package: kdelibs5
Version: 4.1.2-1
Severity: serious
Justification: Sune says so


When you use kdelibs5-4.1.2-1 with a libpcre3 version lower than 7.7 there is a regression with kjs.
With the kjs javascript debugger enabled you will see a parse error when visiting e.g. http://www.regular-expressions.info/javascriptexample.html
If you upgrade libpcre3 to a version above, or equal to, 7.7 this parse error doesn't show and the javascript works as expected.

I believe that this happens because kdelibs5-4.1.2-1 is built against libpcre3-7.8-1 and kjs enables a certain feature for libpcre3 versions above 7.7:

kjs/regexp.cpp:148:#ifdef PCRE_JAVASCRIPT_COMPAT // introduced in PCRE 7.7
kjs/regexp.cpp-149-  options |= PCRE_JAVASCRIPT_COMPAT;
kjs/regexp.cpp-150-#endif

A possible solution would be to make kdelibs5 depend on >=libpcre3-7.7 as it doesn't depend on a specific version right now.

On #khtml someone mentioned this:
[18:48:40] <OffEagle> We should probably use pcre_feature_supported.
[18:49:17] <OffEagle> Of course, that's really generally the case that if you run against an older version of library you'll get problems.

Reaction on #debian-kde:
[09:39:56] <pusling> he is usually right.
[09:40:44] <pusling> please for now report a serious bug against kdelibs5 with this info. If you are in doubt about justification, just say "Sune says so" ;)


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (900, 'testing'), (600, 'unstable'), (101, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



Reply to: