TD-23400: [All TD versions] SalUncompress fails on large buffers

Post found bugs and possible workarounds.
Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 278
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

TD-23400: [All TD versions] SalUncompress fails on large buffers

Post by Dave Rabelink » 10 Mar 2017, 08:16

When large files are compressed using SalStrCompress the result can not be uncompressed using SalStrUncompress.

Testcase:
Having 2 files containing ANSI text.
One is small and the other large.

The ANSI text is first loaded from disk to memory
Then the ANSI text is converted to UNICODE
Then the UNICODE string is compressed.

This compressed string can be uncompressed when the smaller file is used.
The larger file gives a FALSE on SalStrUncompress.

So, is there a hard limit on the buffer size for SalStrCompress / Uncompress?

Could there be a 64k limitation?
Or is it caused by the buffer being UNICODE text?

PLease check why this fails.

Be sure the test files are correctly loaded from source.
See that the UNICODE string for the large file can not be uncompressed.

The source is in TD61 format so can be tested from there.
I have seen the issue on all TD versions.

Extra info

Tested the limit:

The limit is 95,367431640625 Mb
This is in bytes: 100.000.000

That seems a hardcoded limit.

To my knowledge, the size value in the compression header can contain up to 2.1 Gb
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 278
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-23400: [All TD versions] SalUncompress fails on large buffers

Post by Dave Rabelink » 10 Mar 2017, 08:18

This defect has been registered as

Ticket # 2963024:
TD-23400: SalUncompress fails on large buffers


It is not yet fixed. All TD versions have this issue (incl TD 7.0 UPD1).
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “Bug Reports”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests