bugGNU nano - Bugs: bug #46413, regcomp() does not like certain...

 
 

bug #46413: regcomp() does not like certain case-insensitive strings

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Tue 10 Nov 2015 12:25:24 PM UTC  
 
Severity: 2 - MinorStatus: Invalid
Assigned to: NoneOpen/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 10 Nov 2015 01:02:45 PM UTC, comment #1:

I should have used --track-origins=yes earlier:

==9767== Conditional jump or move depends on uninitialised value(s)
==9767== at 0x414324B: re_compile_fastmap_iter (regcomp.c:327)
==9767== by 0x4143898: re_compile_fastmap (regcomp.c:283)
==9767== by 0x4147100: regcomp (regcomp.c:517)
==9767== by 0x805A2CC: nregcomp (rcfile.c:247)
==9767== by 0x805A56A: parse_colors (rcfile.c:758)
==9767== by 0x805ACFE: parse_rcfile (rcfile.c:1175)
==9767== by 0x805AA6E: parse_include (rcfile.c:620)
==9767== by 0x805AC40: parse_rcfile (rcfile.c:1157)
==9767== by 0x805B3C5: do_rcfile (rcfile.c:1406)
==9767== by 0x8057F34: main (nano.c:2498)
==9767== Uninitialised value was created by a stack allocation
==9767== at 0x4138A83: create_tree (regcomp.c:3728)

Benno Schulenberg <bens>
Project Administrator
Tue 10 Nov 2015 12:25:24 PM UTC, original submission:

For some reason the library function regcomp() does not like it when a REG_ICASE string starts with a "x?" construction, that is: a conditional letter -- ignoring any leading "^" or "[[:space:]]*", because they are effectively nothing.

Such strings occur in nanorc.nanorc, for example:

icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="

On my machine, valgrind then complains about a condition depending on uninitialized data. When I change all those 'icolor's to 'color's, then the complaints go away.

I suppose that this is in effect a bug in regcomp(). Right?

Benno Schulenberg <bens>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 22 Dec 2015 08:53:59 PM UTCbensOpen/ClosedOpen=>Closed
    Tue 10 Nov 2015 01:02:45 PM UTCbensStatusNone=>Invalid
      Summaryregcomp does not like certain case-insensitive strings=>regcomp() does not like certain case-insensitive strings

    Back to the top


    Powered by Savane 3.1-cleanup1