g_regex_match_all fails on s390x with Fedora glib2-2.73.2-4.fc37
The following test code fails on s390x with Fedora glib2-2.73.2-4.fc37 (other arches seems okay), while Fedora glib2-2.72.3-1.fc36 it passes even on s390x.
Test code:
#undef G_DISABLE_ASSERT
#include <glib.h>
#include <stdio.h>
#include <locale.h>
#include <stdlib.h>
int main(void) {
setlocale(LC_ALL, "C");
GError *error;
const gchar *pattern = "[A-Z]+";
const gchar *string = "abc DEF ghi JKL mnop";
error = NULL;
GRegex *regex = g_regex_new(pattern, 0, 0, &error);
g_assert_nonnull(regex);
error = NULL;
GMatchInfo *match_info = NULL;
gboolean match_ok = g_regex_match_all(regex, string, 0, &match_info);
g_assert(match_ok);
error = NULL;
gchar **matches = g_match_info_fetch_all(match_info);
g_assert_nonnull(matches);
gint match_count = g_strv_length(matches);
g_assert(match_count == 3);
g_assert_cmpstr(matches[0], ==, "DEF");
g_assert_cmpstr(matches[1], ==, "DE");
g_assert_cmpstr(matches[2], ==, "D");
g_strfreev(matches);
g_match_info_free(match_info);
g_regex_unref(regex);
return 0;
}
compile with $ gcc $(rpm --eval %optflags) $(pkg-config --cflags glib-2.0) $(pkg-config --libs glib-2.0) -o g_regex_test{,.c}
The result on s390x with glib2-2.73.2-4.fc37:
+ ./g_regex_test
Bail out! ERROR:/builddir/build/SOURCES/g_regex_test.c:22:main: assertion failed: (match_ok)
**