Skip to content

[cairo] Mutex in cairo_recording_surface not deleted, triggers Application Verifier stop #26870

@alvinhochun

Description

@alvinhochun

Description / Steps to reproduce the issue

When using Application Verifier on Windows to test a program that uses librsvg, a VERIFIER STOP 0000000000000202: pid 0x864: Freeing heap block containing an active critical section. is frequently emitted when inside cairo_surface_destroy. Further investigation shows that the critical section was initialized inside cairo_recording_surface_create: https://gitlab.freedesktop.org/cairo/cairo/-/blob/04656d7450e229622546fd2b11496aa58c44181d/src/cairo-recording-surface.c#L442

  1. Install mingw-w64-ucrt-x86_64-librsvg
  2. Open Application Verifier from winsdk
  3. Add rsvg-convert.exe and save
  4. Run gdb -ex r --args rsvg-convert.exe -o rsvg.png /ucrt64/share/doc/xz/api/doc.svg

Expected behavior

Program finishes without verifier stop.

Actual behavior

Verifier stop is emitted:
VERIFIER STOP 0000000000000202: pid [...]: Freeing heap block containing an active critical section.

Verification

Windows Version

MINGW64_NT-10.0-19045

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANGARM64

Are you willing to submit a PR?

No response

Also reported upstream as https://gitlab.freedesktop.org/cairo/cairo/-/issues/922

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions