pradeep250677 / lz4

Automatically exported from code.google.com/p/lz4
0 stars 0 forks source link

Memory reference error occurs in "LZ4_compressHC". #59

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When I use "LZ4_compressHC" on my program, memory reference error occurs at 
lz4hc.c (rev88,line 418).

I think that the same conditions as line 443 are required for line 414. 

Original issue reported on code.google.com by Masafumi...@gmail.com on 8 Feb 2013 at 6:14

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for reporting and clear suggestion.
I'll look into it.
Strange that i could not reproduce the issue though.
Do you have a specific file which could help reproduce the issue ?

Regards

Original comment by yann.col...@gmail.com on 8 Feb 2013 at 11:31

GoogleCodeExporter commented 8 years ago
Thank you for your reply.
I certainly have the strange data.
However, the data does not exist in my disk now. 
Sorry, please wait a few more days.

Original comment by Masafumi...@gmail.com on 9 Feb 2013 at 9:43

GoogleCodeExporter commented 8 years ago
The data is a separated sqlite file, and the size is 2MiB.
I checked the data, it was zerofill data.

So, I tested "lz4demo" using zerofill data of several sizes.
In conclusion, in case of more than 65,545 bytes, error occurs.
(WindowsXP 32bit, gcc version 4.5.2 (tdm-1))

Original comment by Masafumi...@gmail.com on 12 Feb 2013 at 4:39

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks, it's clear.

Original comment by yann.col...@gmail.com on 12 Feb 2013 at 10:11

GoogleCodeExporter commented 8 years ago
I'm a bit surprised that the problem did not show up in the automated test 
cases, since this use case was supposed to be covered by "loong", a 60MB file 
with a lot of space characters, sometimes more than 64KB in a row.
Anyway, for some reason, it did not, while your sample triggers the issue.
As a consequence, i've added your file to the automated validation bench.
Rgds

Original comment by yann.col...@gmail.com on 12 Feb 2013 at 10:53

GoogleCodeExporter commented 8 years ago
The following attached file is a release candidate which should solve the 
reported issue.
It uses the correction you proposed.

Original comment by yann.col...@gmail.com on 12 Feb 2013 at 9:39

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you.
I have checked it, and there is no problem.

Original comment by Masafumi...@gmail.com on 14 Feb 2013 at 7:13

GoogleCodeExporter commented 8 years ago
Corrected into r89

Original comment by yann.col...@gmail.com on 19 Feb 2013 at 8:55