Files
RedBear-OS/recipes/tools/sed/source/testsuite/bug-regex15.c
T
vasilito 7686729069 drm: implement syncobj and fence for VIRGL/VirtIO driver
Extract protocol-agnostic FenceTimeline from Intel to shared
src/drivers/fence.rs — atomic-based fence tracking suitable
for Intel, VIRGL, and AMD drivers.

Extract protocol-agnostic SyncobjManager from Intel to shared
src/drivers/syncobj.rs — syncobj create/destroy/signal/reset/
wait/query and sync_file fd export/import.

Wire both into VirtioDriver:
- Add FenceTimeline + SyncobjManager fields
- Implement all 5 GpuDriver syncobj trait methods
  (create, destroy, wait, export_fd, import_fd)
- Track fence seqnos in virgl_submit_3d (allocate
  before submit, signal after completion)

Intel fence.rs and syncobj.rs converted to thin re-export
modules pointing at shared sources — no behavioral change
for Intel driver.

This gives Mesa VIRGL userspace the standard DRM syncobj
API for GPU/compositor synchronization.
2026-06-02 14:33:28 +03:00

50 lines
1.1 KiB
C

/* Test for memory/CPU leak in regcomp. */
#include <config.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
#define TEST_DATA_LIMIT (32 << 20)
int
main ()
{
#ifdef RLIMIT_DATA
regex_t re;
int reerr;
/* Try to avoid eating all memory if a test leaks. */
struct rlimit data_limit;
if (getrlimit (RLIMIT_DATA, &data_limit) == 0)
{
if ((rlim_t) TEST_DATA_LIMIT > data_limit.rlim_max)
data_limit.rlim_cur = data_limit.rlim_max;
else if (data_limit.rlim_cur > (rlim_t) TEST_DATA_LIMIT)
data_limit.rlim_cur = (rlim_t) TEST_DATA_LIMIT;
if (setrlimit (RLIMIT_DATA, &data_limit) < 0)
perror ("setrlimit: RLIMIT_DATA");
}
else
perror ("getrlimit: RLIMIT_DATA");
reerr = regcomp (&re, "^6?3?[25]?5?[14]*[25]*[69]*+[58]*87?4?$",
REG_EXTENDED | REG_NOSUB);
if (reerr != 0)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
printf ("regerror %s\n", buf);
return 1;
}
return 0;
#else
return 77;
#endif
}