Opened 5 years ago

Closed 5 years ago

#448 closed defect (fixed)

CONSTRAINT_ERROR at league.stream_element_vectors.element (LZMA filter)

Reported by: Pavel Zhukov Owned by: Maxim Reznik
Priority: major Milestone:
Component: Matreshka Version:
Keywords: LZMA Cc:

Description

## Packing design/filters for testing (attached)
tar -cJvf /tmp/filters.tar.xz
.objs/xz_cat /tmp/filters.tar.xz /tmp/test
raised CONSTRAINT_ERROR : league-stream_element_vectors.adb:194 index check failed

(gdb) bt
#0 <gnat_debug_raise_exception> (e=0x612540 <constraint_error>) at s-excdeb.adb:43
#1 0x00007ffff71a3975 in ada.exceptions.complete_occurrence (x=x@entry=0x614400) at a-except.adb:932
#2 0x00007ffff71a3980 in ada.exceptions.complete_and_propagate_occurrence (x=x@entry=0x614400) at a-except.adb:941
#3 0x00007ffff71a3d88 in ada.exceptions.raise_with_location_and_msg (e=0x612540 <constraint_error>, f=f@entry=(system.address) 0x7ffff7af0620, l=l@entry=194, c=c@entry=0,

m=m@entry=(system.address) 0x7ffff7326220) at a-except.adb:1167

#4 0x00007ffff71a3964 in <gnat_raise_constraint_error_msg> (file=file@entry=(system.address) 0x7ffff7af0620, line=line@entry=194, column=column@entry=0,

msg=msg@entry=(system.address) 0x7ffff7326220) at a-except.adb:898

#5 0x00007ffff71a3e6b in <gnat_rcheck_CE_Index_Check> (file=file@entry=(system.address) 0x7ffff7af0620, line=line@entry=194) at a-except.adb:1242
#6 0x00007ffff78c36a3 in league.stream_element_vectors.element (self=..., index=<optimized out>)

at /usr/src/debug/matreshka-0.7.0/source/league/league-stream_element_vectors.adb:194

#7 0x0000000000405022 in matreshka.filters.lzma.dictionaries.get (self=..., index=85722170)

at /home/pavel/projects/matreshka/matreshka/trunk/design/filters/matreshka-filters-lzma-dictionaries.adb:58

#8 0x00000000004051eb in matreshka.filters.lzma.dictionaries.repeat (self=..., index=85722170, length=3, output=...)

at /home/pavel/projects/matreshka/matreshka/trunk/design/filters/matreshka-filters-lzma-dictionaries.adb:118

#9 0x000000000040bb87 in matreshka.filters.lzma.xz_unpack.read_match (self=..., input=..., index=1060, output=...)

at /home/pavel/projects/matreshka/matreshka/trunk/design/filters/matreshka-filters-lzma-xz_unpack.adb:700

#10 0x000000000040a6b0 in matreshka.filters.lzma.xz_unpack.read_compressed_chunk_bytes (output=..., ok=true)

at /home/pavel/projects/matreshka/matreshka/trunk/design/filters/matreshka-filters-lzma-xz_unpack.adb:425

#11 0x000000000040ce22 in matreshka.filters.lzma.xz_unpack.read (self=..., input=..., output=...)

at /home/pavel/projects/matreshka/matreshka/trunk/design/filters/matreshka-filters-lzma-xz_unpack.adb:1033

#12 0x0000000000403ee7 in xz_cat () at /home/pavel/projects/matreshka/matreshka/trunk/design/filters/xz_cat.adb:24

(gdb) up
#8 0x00000000004051eb in matreshka.filters.lzma.dictionaries.repeat (self=..., index=85722170, length=3, output=...)

at /home/pavel/projects/matreshka/matreshka/trunk/design/filters/matreshka-filters-lzma-dictionaries.adb:118

118 Data (J) := Self.Get (Index);
(gdb) print index
$6 = 85722170
(gdb) info args
self = (data => (data => 0x6ec250), position => 5)
index = 85722170
length = 3
output = (data => 0x680300)

Attachments (1)

filters.tar.xz (233.5 KB ) - added by Pavel Zhukov 5 years ago.

Download all attachments as: .zip

Change History (2)

by Pavel Zhukov, 5 years ago

Attachment: filters.tar.xz added

comment:1 by Maxim Reznik, 5 years ago

Resolution: fixed
Status: newclosed

In 5503:

Fix error in xz unpack filter

Fixed #448

Note: See TracTickets for help on using tickets.