775 Commits

Author SHA1 Message Date
Marcus Holland-Moritz
d583bd9a2d Update folly/fbthrift 2022-10-21 16:08:10 +02:00
Marcus Holland-Moritz
e94816fcbc Remove all traces of statvfs from dwarfsextract 2022-10-21 15:48:23 +02:00
Marcus Holland-Moritz
a1a9571b13 Update parallel-hashmap to v1.3.8 2022-10-21 13:44:43 +02:00
Marcus Holland-Moritz
01ee8916b6 clang-format 2022-10-21 13:37:43 +02:00
mhx
876fafdd55
Merge pull request #107 from MRWITEK/mincore
Fix `cached_block::is_swapped_out()`
2022-10-21 13:36:52 +02:00
Marcus Holland-Moritz
186eb763a3 Fix #104: read large files in chunks rather than fully
This changes the way data is sent to libarchive. For files larger
than `max_queued_bytes`, instead of fully reading the compressed
file and then sending the whole file to libarchive at once, the
code now reads chunks of at most `max_queued_bytes` and sends the
chunks to libarchive independently. Small files are treated as
before.

When extracting large files, this method is actually a lot faster
as it puts less strain on the memory allocator.
2022-10-21 11:12:28 +02:00
Marcus Holland-Moritz
dc8490f583 Remove conditional statvfs code in dwarfsextract
Keep things simple, just derive `max_queued_bytes` from the cache
size for now.
2022-10-21 11:07:27 +02:00
Marcus Holland-Moritz
bf2064f650 Fix heap-use-after-free when writing section index
When writing the section index block, an additional entry was added
to the index, potentially reallocating the vector containing the
index. However, we previously took the address of the vector data
in order to write the index, so that address is now invalid.

Fix is by not adding the extra entry to the index.
2022-10-21 11:06:28 +02:00
Marcus Holland-Moritz
59b87cdd9f Fix data race in cached_block 2022-10-21 08:57:21 +02:00
Marcus Holland-Moritz
b07863bcf6 Debug output, assertion & cleanup in op_readdir 2022-10-20 17:12:20 +02:00
mhx
e86a44e3dd
Merge pull request #106 from MRWITEK/main
Fix out of bounds access
2022-10-20 17:04:46 +02:00
Victor Dmitriev
301150c908 Fix cached_block::is_swapped_out()
see `mincore()` documentation
at https://man7.org/linux/man-pages/man2/mincore.2.html
2022-09-23 02:24:29 +03:00
Victor Dmitriev
ea3ffee377 Fix out of bounds access
when `written == buf.size()`
2022-09-23 01:36:21 +03:00
Marcus Holland-Moritz
e8f489a4c1 Update parallel-hashmap 2022-08-04 15:09:57 +02:00
Marcus Holland-Moritz
314d1320cf Only overwrite output image with --force option (fixes #93) 2022-08-03 19:16:30 +02:00
Marcus Holland-Moritz
183a16d953 fsst: deterministic symbol tables (needed to fix #91)
This fixes what I believe is a bug in the fsst library that causes
symbol tables to be non-deterministic. There's an open issue/PR for
the library, so it's not yet clear if this fix is correct/optimal.
2022-08-03 18:59:47 +02:00
Marcus Holland-Moritz
422146d7a2 Produce deterministic inode numbers (needed to fix #91)
While most of the code typically ensures that elements are kept
in a deterministic order, the code that assigned inode numbers
was iterating a hash table, which by itself guaranteed FIFO
semantics, but items were inserted from multiple threads when
scanning the input file system.

This change adds a sorting step before assigning inode numbers.
(This shouldn't be much of a performance hit.)
2022-08-03 18:54:57 +02:00
Marcus Holland-Moritz
6bbd4e3970 Add --no-create-timestamp option (needed to fix #91)
In order to produce bit-identical images, we need to be able to
drop create timestamps from the output.
2022-08-03 18:52:40 +02:00
Marcus Holland-Moritz
2a2d089cea Add Python script for block extraction 2022-07-04 12:45:14 +02:00
Marcus Holland-Moritz
525d7d6007 Fix formatting 2022-06-11 23:04:09 +02:00
Marcus Holland-Moritz
b1e4667aa3 Update change log v0.6.1 2022-06-11 22:46:24 +02:00
Marcus Holland-Moritz
977520cfa8 Fix binary installation 2022-06-11 22:38:04 +02:00
Marcus Holland-Moritz
76b6ffd818 Add codacy badge v0.6.0 2022-06-11 21:59:45 +02:00
Marcus Holland-Moritz
c10f7d2482 More travis tweaking 2022-06-11 21:34:03 +02:00
Marcus Holland-Moritz
2713e2166b Disable man pages on travis while their ruby environment is broken 2022-06-11 21:25:44 +02:00
Marcus Holland-Moritz
6c13150f17 See what's wrong with running ronn on travis 2022-06-11 21:06:16 +02:00
Marcus Holland-Moritz
f07e7e3e2b Update change log 2022-06-11 20:19:26 +02:00
Marcus Holland-Moritz
3bc0a3411e Run travis only on main branch 2022-06-11 20:01:50 +02:00
Marcus Holland-Moritz
ce11821fd2 Build libfmt on demand if we can't find a usable version 2022-06-11 19:46:08 +02:00
Marcus Holland-Moritz
898b2b859a Update travis links in README 2022-06-11 09:02:54 +02:00
Marcus Holland-Moritz
1a6dcc6c73 Strip packaged binaries 2022-06-11 08:24:04 +02:00
Marcus Holland-Moritz
2c1e6b2528 Update realclean target 2022-06-11 07:56:08 +02:00
Marcus Holland-Moritz
8c73147acb Update libarchive version 2022-06-10 22:53:17 +02:00
Marcus Holland-Moritz
2a20df6368 Update README index 2022-06-10 22:42:58 +02:00
Marcus Holland-Moritz
7b8b25a9a7 Fix #75: Suggested environment for static build?
Add docs for setting up a static build environment.
2022-06-10 22:41:31 +02:00
Marcus Holland-Moritz
07bd50defa Fix implicit this captures 2022-06-10 22:27:34 +02:00
Marcus Holland-Moritz
670a1e437d Build folly without exception tracer in static builds 2022-06-10 20:47:47 +02:00
Marcus Holland-Moritz
8c7eb3858f Fix #85: Feature request: dwarfsextract for windows
This change removes the dependency on <sys/statvfs.h>. Not sure
if this is enough to get things building on windows. :-)
2022-06-10 19:20:10 +02:00
Marcus Holland-Moritz
b06975eb2a Switch to C++20 2022-06-10 19:07:47 +02:00
Marcus Holland-Moritz
d2133354b7 Fix #86: block size bits config issues
- limit block size bits to between 10 and 30
- slightly tweak help for --block-size-bits
- fix math to make sure we *could* use block sizes above 30
2022-06-10 19:07:33 +02:00
Marcus Holland-Moritz
3d2059a457 Fix build with new thrift version 2022-06-10 18:56:29 +02:00
Marcus Holland-Moritz
9264eef0b0 Update fbthrift 2022-06-10 18:55:15 +02:00
Marcus Holland-Moritz
8c2b5ad40b Update folly 2022-06-10 18:55:08 +02:00
Marcus Holland-Moritz
d8304082cf Update zstd 2022-06-10 18:54:59 +02:00
Marcus Holland-Moritz
6c48f24bc1 Update parallel-hashmap 2022-06-10 18:54:47 +02:00
Marcus Holland-Moritz
8db0176f4f Update xxHash 2022-06-10 18:54:24 +02:00
Marcus Holland-Moritz
075194067a Fix #67: dwarfs I/O hangs if call to to fuse_reply_iov fails 2022-06-10 18:49:18 +02:00
Marcus Holland-Moritz
14654b6f38 Fix #71: driver hangs when unmounting
The tidy thread that gets spawned when constructing the block cache
doesn't survive the fork to background when the driver is not being
run in foreground mode. This is a familar problem that we already
ran into with the cache worker threads. The fix is simple: just delay
the thread spawning until after we've forked to background.
2022-06-10 18:49:18 +02:00
Marcus Holland-Moritz
569966b752 Markdown cleanup 2022-06-10 18:49:18 +02:00
Marcus Holland-Moritz
9ad4dd655f Update fbthrift 2022-06-10 18:49:18 +02:00