New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"encode_decode_test.c" infinite loop while encoding #70

Closed
GoogleCodeExporter opened this Issue Mar 24, 2015 · 3 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter

GoogleCodeExporter commented Mar 24, 2015

What steps will reproduce the problem?

1. Use the attached "test_source" and "test_input" files as the source and
input for an encode operation using the encode_decode_test.c

2. Watch the code lock up infinite loop.

3. After forcefully closing the application, a delta file will be produced.
I've attached the delta_output I received. I'm not sure whether this delta
is valid or not, but when running the decoding process using the
"test_source" and the "delta_output", the file it produces does not equal
"test_input". 


Using xdelta3.0t on Windows Vista, using Visual C++ 2008 (VC9).

Code example, just replace the appropriate lines in the "encode_decode_test.c"

Code for step 1:

    InFile = fopen("C:\\test_input", "rb");
    SrcFile = fopen("C:\\test_source", "rb");
    OutFile = fopen("C:\\delta_output", "wb");

    r = code (1, InFile, SrcFile, OutFile, 0x1000);

    fclose(OutFile);
    fclose(SrcFile);
    fclose(InFile);

Code for step 2:

    InFile = fopen("C:\\delta_output", "rb");
    SrcFile = fopen("C:\\test_source", "rb");
    OutFile = fopen("C:\\result.abc", "wb");

    r = code (0, InFile, SrcFile, OutFile, 0x1000);

    fclose(OutFile);
    fclose(SrcFile);
    fclose(InFile);

Original issue reported on code.google.com by wyatto...@gmail.com on 12 Apr 2008 at 7:39

Attachments:

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 24, 2015

Thank you!

This was an excellent test case.  The problem was fairly easy to discover, and 
shows
(for the second time) that I need to add the non-blocking encode_decode_test to 
my
comprehensive test suite.

I'd like to hold off on making a new release for a little while, but the 
problem has
been fixed in SVN 234.

I've made some compilation fixes and added command-line arguments to
encode_decode_test, to make testing easier.

Original comment by josh.mac...@gmail.com on 15 Apr 2008 at 4:03

  • Changed state: Fixed

GoogleCodeExporter commented Mar 24, 2015

Thank you!

This was an excellent test case.  The problem was fairly easy to discover, and 
shows
(for the second time) that I need to add the non-blocking encode_decode_test to 
my
comprehensive test suite.

I'd like to hold off on making a new release for a little while, but the 
problem has
been fixed in SVN 234.

I've made some compilation fixes and added command-line arguments to
encode_decode_test, to make testing easier.

Original comment by josh.mac...@gmail.com on 15 Apr 2008 at 4:03

  • Changed state: Fixed
@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 24, 2015

A more proper fix is in SVN 239.  This is a really great test case because it's 
hard
to construct by hand (requires hash collisions).

Original comment by josh.mac...@gmail.com on 22 Apr 2008 at 2:45

GoogleCodeExporter commented Mar 24, 2015

A more proper fix is in SVN 239.  This is a really great test case because it's 
hard
to construct by hand (requires hash collisions).

Original comment by josh.mac...@gmail.com on 22 Apr 2008 at 2:45

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 24, 2015

I've been working on a new regression test and just added a test for this case.

Original comment by josh.mac...@gmail.com on 10 Jul 2008 at 4:09

GoogleCodeExporter commented Mar 24, 2015

I've been working on a new regression test and just added a test for this case.

Original comment by josh.mac...@gmail.com on 10 Jul 2008 at 4:09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment