Skip to content

[libimagequant] Segmentation fault #23316

@radarhere

Description

@radarhere

Description / Steps to reproduce the issue

Over at https://github.com/python-pillow/Pillow, our MinGW GitHub Actions job recently showed a segfault when libimagequant is used. The job passed with mingw-w64-x86_64-libimagequant-4.3.3-1, but started failing when mingw-w64-x86_64-libimagequant-4.3.3-2 was released. That change came from 2d14aef, so perhaps this is related to cargo-c?

For good measure, I updated to libimagequant 4.3.4 in #23245, but the problem continued to occur.

I've created a minimal reproduction at https://github.com/radarhere/mingw_libimagequant. The segfault occurs in https://github.com/radarhere/mingw_libimagequant/actions/runs/13198684016/job/36845578278, but without the call to libimagequant's liq_version(), it passes in https://github.com/radarhere/mingw_libimagequant/actions/runs/13198259889

Expected behavior

No segmentation fault.

Actual behavior

Segmentation fault.

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