I have the following function that works fine if the regular expression is correct, but get a SIGSEGV when calling regex_search compiling with clang-9 and using musl 1.2. However, it works fine with glibc, Could be a bug in musl library? Find code below void CRuntimeCommandLine::LoadComplement(const multimap& mapArguments) { // Find parameter multimap::const_iterator iter; iter = mapArguments.find("Complement"); if(iter == mapArguments.end()) { // Only fatal. Statement is not initialized yet. Logger::fatal(Errors::RCMD_F005_MISSING_MANDATORY_PARAM, "Missing mandatory parameter --Complement"); } // regex expression for system_secret to be checked (Max 4Bytes, hexadecimal number in lowe case letters and no 0x format) regex regexp("^[0-9a-f]{1,8}$"); // regex_search that searches pattern regexp in the string mystr std::string s = iter->second.c_str(); if (false == std::regex_search(s, regexp)) { // Only fatal. Statement is not initialized yet. Logger::fatal(Errors::RCMD_F006_INVALID_VALUE, "Invalid --Complement=hexvalue value"); } else { // get hexadecimal value (void)sscanf(s.c_str(), "%X", &(m_cmdParameters.complementValue)); } } With kind regards Elena Quesada Gonzalez Siemens Rail Automation S.A.U. Mobility Rail Infrastructure DS3 SMO RI R&D ES PF 1 Ronda de Europa, 5 28760 Tres Cantos, Spain Mobile: +34 686405648 mailto:elena.quesada_gonzalez@siemens.com www.siemens.es [cid:image001.gif@01D7E214.8C900130] Siemens Rail Automation, S.A.U. A28512598. Ronda de Europa 5, Tres Cantos 28760 (Madrid). Hoja: M- 2.583, Tomo: 22716, Folio: 60. Los datos que nos aporte o nos haya aportado son tratados por Siemens Rail Automation S.A.U. para atender su mensaje o, en su caso, prestarle el servicio que haya solicitado. Tiene derecho a acceder, rectificar, suprimir los datos y otros derechos, como se explica en la politica de privacidad. www.siemens.com/es/es/home/informacion-corporativa/legal.html