Assert fail at dac.cpp

Issue #132 new
Alexey Parfenov created an issue

This assert:

https://bitbucket.org/zxtune/zxtune/src/e5dbc0078aa0a4edfbd166f9499790538395b579/src/devices/dac/dac.cpp#lines-96

fails in a debug version of the code when processing samples/archived/trd/CHIMORAN.TRD.

How I tested it (on Linux):

make -j$(nproc) debug=debug platform=linux arch=x86_64 prebuilt.dir=/usr/local -C apps/zxtune123
bin/linux_x86_64/debug/zxtune123 --benchmark 1 samples/archived/trd/CHIMORAN.TRD

It fails when decoding the third subtune. The output:

x72.24  (CHI)   samples/archived/trd/CHIMORAN.TRD?porogE1.CHI   [0x88b32256]
x78.74  (CHI)   samples/archived/trd/CHIMORAN.TRD?Mind*2.CHI    [0x6367f10c]
zxtune123: /root/zxtune/src/devices/dac/dac.cpp:96: Sound::Sample::Type Devices::DAC::FastSample::Iterator::GetNearest() const: Assertion `IsValid()' failed.
Aborted (core dumped)

There's no such error in the release version, because the assert is optimized out, but there apparently can be an out-of-bounds array access in the next line if IsValid() is false.

Comments (0)

  1. Log in to comment