Skip to content

[BUG] Cascaded Illegal Memory Access with High Compression Ratio #96

@NicolasDenoyelle

Description

@NicolasDenoyelle

Describe the bug

nvcomp cascaded manager runs into an illegal memory access when reading the compressed output size after compressing highly compressible data.

Steps/Code to reproduce bug

Reproducer: nvcomp-reproducer.cpp.txt

Compile with:

g++ -g -Wall -Wextra -Wall -std=c++17 -I/usr/local/cuda/include -I<path_to_nvcomp.h> nvcomp-reproducer.cpp -o reproducer -lcudart -lnvcomp && ./reproducer  

Expected behavior

The reproducer I attached compresses two buffers of the same size with the same cascaded manager.
One buffer is filled with random data and works fine.
The other buffer is filled with a sequence of {0,1,0,1,...} and triggers the error.
In the reproducer, I took care of making sure that buffer sizes are appropriate:

  • a multiple of the nvcompType_t being compressed
  • a multiple of the cascaded interface chunk sizes
  • at least the maximum compressed size given by nvcomp prior to compression.

Environment details:

  • Bare-metal
  • Cuda Driver Version: 535.154.05
  • CUDA Version: 12.2
  • NVIDIA GeForce RTX 3050
  • nvcomp Version: 3.0.4 (no extensions)

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