reeeed / doubango

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

A.1.4 SHA-1 test fails with a DMS of 8192 but passed with a DMS or 65530 or 65536 #163

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

Please use labels and text to provide additional information.
A.1.4 SHA-1  test fails with a DMS of 8192 but passed with a DMS or 65530 or 
65536.  Note that RFC4465 states that it should pass with a DMS of 2048).

For the torture tests that Doubango uses a DMS of 65530

From test_tortures.h…

#define DECOMPRESSION_MEMORY_SIZE   65530

static int test_tortures()

{

      size_t i, start, end;

      size_t res_size = 0;

      char buffer[OUTPUT_BUFFER_SIZE];

      tcomp_manager_handle_t *manager = tcomp_manager_create();

      tcomp_result_t *result = tcomp_result_create();

      isBigEndian = ((*(int8_t *)&wordForEndianess) != 0x21);

      /* Add SIP dictionary. */

      tcomp_manager_addSipSdpDictionary(manager);

      /* Add Presence dictionary. */

      tcomp_manager_addPresenceDictionary(manager);

      /* Set decompression size. */

      tcomp_manager_setDecompression_Memory_Size(manager, DECOMPRESSION_MEMORY_SIZE);

…

There are a couple of confusing things here

1.       The suggested sizes for DMS in test_manager.h are 
8192//4096//8192//65536.  Is the 65530 a typo and should be 65536?

2.       For torture tests no size seems to be specified for SMS or CPB. Is 
this correct?

3.  In RFC 4465 introduction it states    

Each test runs in the SigComp minimum decompression memory size (that is, 2K), 
within the minimum number of cycles per bit (that is, 16) and in tests where 
state is stored 2K state memory size is needed.

Note that the test ‘A.1.4 SHA-1’ only passes when the DMS is set to 65530 
(or 65536).  If using the stated minimum settings it fails.

Original issue reported on code.google.com by boss...@yahoo.fr on 8 Jan 2013 at 11:35

GoogleCodeExporter commented 9 years ago
1. No it's not typo. It's just a test that the stack will take the nearest 
valid value.
2. Any 2K UDVM memory size must work. Fixed.
3. You're right.

Original comment by boss...@yahoo.fr on 9 Jan 2013 at 2:21

GoogleCodeExporter commented 9 years ago
Fixed in SVN r805+
/!\Please note that some torture tests require previous ones and the first have 
to be started with clean manager state.

Original comment by boss...@yahoo.fr on 10 Jan 2013 at 12:45