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
Test 140: libarchive_test_fuzz_tar fails in VS2015 #637
Comments
This is expected; test_fuzz_tar doesn't log very much. It just tries to crash libarchive by feeding it randomly corrupted data. Would it be possible for you to run this particular test under a debugger and give us a stack trace? |
This test fails for me on Linux with gcc5 (and also with clang too) , how can I run it under the debugger? I didn't see a standalone executable. |
The test suite consists of three standalone executables: libarchive_test, bsdtar_test, and bsdcpio_test. libarchive_test requires a -r option with the full path to the libarchive/test directory (which contains the various reference files used in the test). I usually run it with -v -v -v to get more output to the console. So I recommend running it under the debugger as: libarchive_test -r path_to_libarchive/test -vvv test_fuzz_tar |
Can't get it to crash with debug enabled but valgrind shows the culprit (crash was in bzip2 code):
|
This could be a red herring: Reading uninitialized data isn't always a bug. But it is worth checking further:
|
Here is a gdb session with the backtrace, let me know if you need more details:
|
Unfortunately, I don't know enough about bz2lib internals to know whether the information you've shown indicates an error. The real question is whether this is a problem with libarchive or with bz2lib. What version of bz2lib are you using? (I'm not seeing the same problem on OS X with libarchive master and bz2lib 1.0.6.) |
The crash seems to be due to https://build.opensuse.org/package/view_file/openSUSE:Factory/bzip2/bzip2-faster.patch , I'll check with our guys (SUSE). Thanks a lot! |
I'm glad you tracked that down. I'll close this report for now; feel free to re-open it if it turns out that the problem is not with your bz2 library. |
Basic Information
Version of libarchive: pulled from master (8adeb0a - last of 2015)
How you obtained it: (build from source, pre-packaged binary, etc) built from source
Operating system and version: Windows 10 Home Premium 64bit
What compiler and/or IDE you are using (include version): VS2015
Description of the problem you are seeing:
What did you do? Ran build process. Ran tests. (Had to do a number of cleanup things involving VS2015 and snprintf being defined as a macro (will submit pull request soon - it's in the hinrichsenhans/libarchive vs2015 branch).)
What did you expect to happen? Tests pass
What actually happened? Tests failed
What log files or error messages were produced? Pasted below. This is a report for test 140 - there were other failures that I'll look at and report soon.
18:libarchive_test_archive_match_time
140:libarchive_test_fuzz_tar
333:libarchive_test_read_format_zip_utf8_paths
371:libarchive_test_warn_missing_hardlink_target
479:bsdcat_test_error
480:bsdcat_test_error_mixed
506:bsdtar_test_leading_slash
557:bsdcpio_test_option_a
How the libarchive developers can reproduce your problem:
What other software was involved? Just VS2015, cmake, libarchive, and the gnuwin32 binaries/libraries
What other files were involved? none
How can we obtain any of the above?
Test 140 shows an empty test_fuzz_tar.log file. From the LastTest.log:
140/580 Testing: libarchive_test_fuzz_tar
140/580 Test: libarchive_test_fuzz_tar
Command: "C:/libarchive_build/libarchive_bin/bin/Debug/libarchive_test.exe" "-vv" "-r" "C:/libarchive_build/libarchive/libarchive/test" "test_fuzz_tar"
Directory: C:/libarchive_build/libarchive_bin/libarchive/test
"libarchive_test_fuzz_tar" start time: Jan 06 08:43 Central Standard Time
Output:
. ----------------------------------------------------------
If tests fail or crash, details will be in:
C:\Users\Hans\AppData\Local\Temp/libarchive_test.exe.2016-01-06T08.43.16-000
Reference files will be read from: C:/libarchive_build/libarchive/libarchive/test
Exercising:
Test time = 6.43 sec
. ----------------------------------------------------------
Test Failed.
"libarchive_test_fuzz_tar" end time: Jan 06 08:43 Central Standard Time
"libarchive_test_fuzz_tar" time elapsed: 00:00:06
. ----------------------------------------------------------
Folder contents here:
libarchive_test.exe.2016-01-06T08.43.16-000.zip
The text was updated successfully, but these errors were encountered: