Skip to content

estimated_compression_context_size() raises SIGFPE with `enable_ldm=True #345

Description

@marinelay

Summary

Calling estimated_compression_context_size() on compression parameters constructed with enable_ldm=True terminates Python with SIGFPE.

Versions

zstandard 0.25.0, CPython 3.12.3, Ubuntu 24.04.4 x86_64, glibc 2.39.

Reproducer

import zstandard as zstd

params = zstd.ZstdCompressionParameters.from_level(3, enable_ldm=True)
params.estimated_compression_context_size()

This one exited with SIGFPE (signal 8; shell status 136).

I found this while fuzzing Python C extension modules.
I would expect a size estimate or a Python exception rather than process termination.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions