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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  Benno Schulenberg <bens>
Submitted:  Tue 10 Nov 2015 12:25:24 PM UTC
   
 
Severity:  2 - Minor Status:  Invalid
Assigned to:  None Open/Closed:  Closed

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>
Group 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>
Group administrator

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-22 bens Open/ClosedOpen Closed
    2015-11-10 bens StatusNone 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.13-f8d8.
    Corresponding source code