Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1637943964.nt08b4os1z.none@localhost>
Date: Fri, 26 Nov 2021 11:32:24 -0500
From: Alex Xu <alex@...u.ca>
To: "Quesada Gonzalez, Elena" <elena.quesada_gonzalez@...mens.com>
Cc: musl@...ts.openwall.com
Subject: RE: SIGSEV error when using REGEX with musl library

Excerpts from Quesada Gonzalez, Elena's message of November 26, 2021 6:46 am:
> Hi, 
> 
> A simple main with the following code, should replicate the error.
> 
> #include <regex>
> void main()
> {
> 
>     std::regex regexp("^[a-z0-9]{1,8}$");
>     std::string s = ("0xAz10145274");
>     if (false == std::regex_search(s, regexp))
>      {
>          // Only fatal. Statement is not initialized yet.
>          printf("Invalid regex [%s]\n", __FUNCTION__);
>        exit(1);
>       }
>     else {
>           printf("Regex ok [%s]\n", __FUNCTION__);
>     }
> }
> 
> Thanks for your time

This program does not compile.

test.cpp:2:1: error: '::main' must return 'int'
    2 | void main()
      | ^~~~

After adjusting it to return int, it printed "Invalid regex [main]" 
under both glibc and musl. After removing the anchors, it printed "Regex 
ok [main]" under both glibc and musl.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.