From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15885 invoked from network); 26 Nov 2021 16:35:07 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 26 Nov 2021 16:35:07 -0000 Received: (qmail 17673 invoked by uid 550); 26 Nov 2021 16:35:01 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 16112 invoked from network); 26 Nov 2021 16:32:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alxu.ca; s=default; t=1637944318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q4QsOigxYOvu6tjhKkn7IsWH0GuEOANehFECKMcaM2g=; b=M4e9U0//8sAa/oFwY3XgHyx8iRgnestA2dXNEzktigeUWO9iAEQmS+N8U8rsjlLlcpmXTs k9sZ3sJEZpDbbk9uQXmZoWzDglCH3xSg32NTlJWi9wTMITrPIBCz9F9xwXDDObQxEEaR56 P6iSd3M1WqkyNaDopju7TPbp5A1Ko1kKT6Vg9RpGlmWY31YwL0g7rAmanJcua3+4ddGJ3k Qbi8Vjj++GWc4TkIPbdAYPVdzRsVPQT90RGD2u671vRm3hYS1DT3xHSpIWFn7R5e55h8Y/ dMIFZwUL3WLmrId5D4lhqm+8RBXWyoABYu7SKuoACOhHcFoE80gL1JKruMJHlQ== Date: Fri, 26 Nov 2021 11:32:24 -0500 From: Alex Xu To: "Quesada Gonzalez, Elena" Cc: musl@lists.openwall.com References: <20211125155200.GB7074@brightrain.aerifal.cx> In-Reply-To: MIME-Version: 1.0 Message-Id: <1637943964.nt08b4os1z.none@localhost> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: RE: [musl] SIGSEV error when using REGEX with musl library Excerpts from Quesada Gonzalez, Elena's message of November 26, 2021 6:46 a= m: > Hi,=20 >=20 > A simple main with the following code, should replicate the error. >=20 > #include > void main() > { >=20 > std::regex regexp("^[a-z0-9]{1,8}$"); > std::string s =3D ("0xAz10145274"); > if (false =3D=3D 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__); > } > } >=20 > 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]"=20 under both glibc and musl. After removing the anchors, it printed "Regex=20 ok [main]" under both glibc and musl.