This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: question about regex



On 2020/1/3 16:09, liqingqing wrote:
> 
> 
> On 2020/1/3 6:14, Paul Eggert wrote:
>> On 1/2/20 8:16 AM, Tim Rühsen wrote:
>>> Meanwhile grep (or libc) seems to exit gracefully:
>>
>> Yes, there's no core dump if the operating system supports stack overflow detection that grep can use. The problem occurs only on OSes that don't do that, or on apps that don't try to detect stack overflow and simply dump core (or worse).
>>
>> On 1/2/20 2:54 AM, liqingqing wrote:
>>
>>> do we have any plan or good ways to fix up the bug as below
>>
>> The best way would be to fix bug#24269, i.e., fix the glibc regex code so that it doesn't blow the stack. If you could write a patch for this bug (something that doesn't hurt performance for ordinary regexps), that would be welcome.
>>

hello everyone, I have read the regex source code and found that it's not a easy work to fix bug#24269 by modify the regex algorithm.
a possible way is that add a backtrack limit to avoid infinite loop. I have tested this way and it works ok.
so what do you think about the bug#24269?  optimize the algorithm or add a backtrack-limit? or not fix.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]