View Issue Details

IDProjectCategoryView StatusLast Update
0036643FPCPackagespublic2020-02-04 12:41
ReporterPetr-K Assigned To 
Status newResolutionopen 
Product Version3.3.1 
Summary0036643: Range check error in packages/paszlib/src/trees.pas
DescriptionIf compiled with range checking in function send_tree() construction nextlen := tree[n+1].dl.Len;
The same construction in function scan_tree() was wrapped with {$push}{$R-} ... {$pop} by florian in rev 23890.
Similar patch is included.
TagsNo tags attached.
Fixed in Revision
Attached Files



2020-01-31 11:16


trees.patch (374 bytes)   
Index: trees.pas
--- trees.pas	(revision 39611)
+++ trees.pas	(working copy)
@@ -1553,7 +1553,9 @@
   for n := 0 to max_code do
     curlen := nextlen;
     nextlen := tree[n+1].dl.Len;
     if (count < max_count) and (curlen = nextlen) then
trees.patch (374 bytes)   

J. Gareth Moreton

2020-01-31 12:14

developer   ~0120823

This might be an ongoing issue with a couple of my recent optimisation improvements on i386 and x86_64. It seems to have messed up the range checking a bit, so I'll have to see what's going on.

Marco van de Voort

2020-02-04 10:54

manager   ~0120878

nextlen is integer, dl.len is word, no mode, so that seems definitely a range violation.

J. Gareth Moreton

2020-02-04 12:07

developer   ~0120879

Does the issue still exist?

J. Gareth Moreton

2020-02-04 12:41

developer   ~0120880

(Range check issue at 0036630 has been resolved - uncertain if this is related)

Issue History

Date Modified Username Field Change
2020-01-31 11:16 Petr-K New Issue
2020-01-31 11:16 Petr-K File Added: trees.patch
2020-01-31 12:14 J. Gareth Moreton Note Added: 0120823
2020-02-04 10:54 Marco van de Voort Note Added: 0120878
2020-02-04 12:07 J. Gareth Moreton Note Added: 0120879
2020-02-04 12:41 J. Gareth Moreton Note Added: 0120880