[SDK] Remove std::regex usage from rocprofiler-sdk library and common library (#421)

* Remove std::regex usage from rocprofiler-sdk and common library

- See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118408
- std::regex usage produces exceptions or segfaults when used when on applications compiled with dual ABI
- Add code restrictions workflow
  - simple workflow ensuring code restrictions (such as std::regex) are not used

* Update CHANGELOG

* Explicitly set permissions for restrictions workflow

* Fix handling of /proc/cpuinfo entries with no info

- e.g. "power_management:" (colon is last character)

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
Tá an tiomantas seo le fáil i:
Madsen, Jonathan
2025-05-29 23:11:13 -05:00
tiomanta ag GitHub
tuismitheoir 7f22b66a9b
tiomantas dbb2e52216
D'athraigh 12 comhad le 212 breiseanna agus 47 scriosta
+6 -2
Féach ar an gComhad
@@ -310,7 +310,9 @@ find_clients()
if(fs::exists(itr) && resolved_exists(itr))
{
auto elfinfo = common::elf_utils::read(itr);
if(!elfinfo.has_symbol(std::regex{"^rocprofiler_configure$"}))
if(!elfinfo.has_symbol([](std::string_view symname) {
return (symname == "rocprofiler_configure");
}))
{
ROCP_CI_LOG(WARNING) << fmt::format(
"[ROCP_TOOL_LIBRARIES] rocprofiler-sdk tool library '{}' did not "
@@ -379,7 +381,9 @@ find_clients()
if(fs::exists(itr) && resolved_exists(itr))
{
auto elfinfo = common::elf_utils::read(itr);
if(!elfinfo.has_symbol(std::regex{"^rocprofiler_configure$"}))
if(!elfinfo.has_symbol([](std::string_view symname) {
return (symname == "rocprofiler_configure");
}))
{
ROCP_INFO << fmt::format(
"Shared library '{}' did not contain the 'rocprofiler_configure' symbol "