Skip to content

glib causes ASan bad-free on initialization in specific setup #25267

@afishhh

Description

@afishhh

Description / Steps to reproduce the issue

See https://github.com/afishhh/mpv/actions/runs/17207944116/job/48812591894#step:5:761.

This is the result of an mpv CLANG64 CI run altered to build and link with https://github.com/afishhh/subrandr (as a shared library). I'm not sure why this happens and whether it's somehow subrandr's fault, but was directed to report this here.

I believe the glib dependency is only here because of harfbuzz which links to glib. The thing is that this build already depended on harfbuzz before this change, because libass depends on harfbuzz. This makes it seem like the behavior may be caused by this multiple-dependence or maybe some initialization order weirdness?

Expected behavior

No crash, or at least not such a mysterious one in DllMain.

Actual behavior

https://github.com/afishhh/mpv/actions/runs/17207944116/job/48812591894#step:5:761
bad-free in DllMain seemingly in gobject initialization.

Verification

Windows Version

MINGW64_NT-10.0-20348

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANGARM64

Are you willing to submit a PR?

No response

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