Skip to content

C: Compressing large input data triggers an assert (with BROTLI_DEBUG=1) #1389

@niklasalbers

Description

@niklasalbers

Trying to compress large input data triggers an assert:
enc/hash_longest_match64_simd_inc.h:198: FindLongestMatchH68: Assertion `cur_ix_masked + max_length <= ring_buffer_mask' failed.

If quality is set to 6, input data larger than 33554431 bytes will trigger the assert.
If I reduce BROTLI_PARAM_LGWIN / --lgwin, the assert will be triggered for smaller data sizes.

I was not able to reproduce it with version 1.1.0.

How to reproduce:

  1. Compile with BROTLI_DEBUG=1.
  2. head -c 33554432 /dev/urandom > large-file && brotli --quality=6 --force large-file --output=large-file.out
  3. head -c 8388607 /dev/urandom > large-file && brotli --quality=6 --force large-file --output=large-file.out --lgwin=21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions