Non capturing parenthesis in regexp causes seg fault.

Arran Cudbard-Bell A.Cudbard-Bell at sussex.ac.uk
Fri Feb 15 19:15:13 CET 2008


Alan DeKok wrote:
> Arran Cudbard-Bell wrote:
>   
>> Hi,
>>
>> Got this on my 32bit intel box running Ubuntu Linux 6.10
>>
>> if("%{User-Name}" =~ /(?:.*)/){
>>     
>
>   I'm not sure that's a valid regular expression... '?' is usually a
> modifier...
>   
It is...

It allows you to create backreferences but not capture the result directly.

http://www.regular-expressions.info/brackets.html

Pretty sure it's supported with the PCRE library.
>   
>> Program received signal SIGSEGV, Segmentation fault.
>> [Switching to Thread -1213196608 (LWP 6433)]
>> 0xb7bc9492 in regexec () from /lib/tls/i686/cmov/libc.so.6
>> (gdb) bt
>> #0  0xb7bc9492 in regexec () from /lib/tls/i686/cmov/libc.so.6
>>     
>
>   It might be a bug in the regular expression library...
>
>   
>> #1  0x0806d6a9 in ?? ()
>>     
>
>   Ugh.  2.0.x *should* be built with debugging symbols, and should *not*
> be stripped of those symbols before being installed.
>   
Yes, and this is from CVS. I'll rebuild with the debug flags...
>   Alan DeKok.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>   


-- 
Arran Cudbard-Bell (A.Cudbard-Bell at sussex.ac.uk)
Authentication, Authorisation and Accounting Officer
Infrastructure Services | ENG1 E1-1-08 
University Of Sussex, Brighton
EXT:01273 873900 | INT: 3900




More information about the Freeradius-Users mailing list