[pcre-dev] [Bug 1626] New: coredump at least since 8.35 with…

Páxina inicial
Borrar esta mensaxe
Autor: admin
Data:  
Para: pcre-dev
Temas novos: [pcre-dev] [Bug 1626] coredump at least since 8.35 with expression "[\]\)", [pcre-dev] [Bug 1626] coredump at least since 8.35 with expression "[\]\)", [pcre-dev] [Bug 1626] coredump at least since 8.35 with expression "[\]\)"
Asunto: [pcre-dev] [Bug 1626] New: coredump at least since 8.35 with expression "[\]\)"
https://bugs.exim.org/show_bug.cgi?id=1626

            Bug ID: 1626
           Summary: coredump at least since 8.35 with expression "[\]\)"
           Product: PCRE
           Version: 8.37
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: ph10@???
          Reporter: markuman@???
                CC: pcre-dev@???


Created attachment 807
--> https://bugs.exim.org/attachment.cgi?id=807&action=edit
example file where the crash is reproduceable with

GNU Octave is using libpcre for it's regexp & regexprep function.

This will coredump GNU Octave



file = "xlsread.m";
fid = fopen (file);
str = fread (fid, "char=>char").';
fclose (fid);
mainregex =
'((^|\n)(([\]\)}\w.]''+|[^''%])+|''[^''\n]*(''''[^''\n]*)*'')*)[^\n]*';
str = regexprep (str, mainregex, "$1");


By skipping the tokken with ?:[\]\) it works


file = "xlsread.m";
fid = fopen (file);
str = fread (fid, "char=>char").';
fclose (fid);
mainregex =
'((^|\n)((?:[\]\)}\w.]''+|[^''%])+|''[^''\n]*(''''[^''\n]*)*'')*)[^\n]*';
str = regexprep (str, mainregex, "$1");


I can reproduce it with:

Arch Linux
GNU Octave 3.8 & libpcre 8.36-2
GNU Octave 3.8 & libpcre 8.37-1
GNU Octave 4.0.rc3 & libpcre 8.36-2

Debian
GNU Octave 4.0.rc4 & libpcre 8.35-3

It works fine without coredump on Ubuntu
GNU Octave 3.8 & libpcre 8.31-2

--
You are receiving this mail because:
You are on the CC list for the bug.