-
Notifications
You must be signed in to change notification settings - Fork 17
Double free corruption with alternative input layout #54
Comments
Do you have additional details about the double free? Was it detected by glibc or valgrind? I've not seen that in my own testing. If it's in the code paths that only happen when building without the alternative input layout, then I some help tracking down the problem would be welcome. |
Actually, trying the modified swupd-server with traditional meta-swupd (and thus the original input layout) won't be that hard to test for me - I'll try tomorrow and report back. |
@pohly: @tmarcu and I were seeing the same two test failures, but they appeared to manifest for different reasons. My failures are below. The "file-name-blacklisted" test fails with The "state-file" test fails with a segfault. Backtrace:
|
In Ostro OS, we already have a "full" directory with all files. Splitting it up into bundles just so that swupd-create-update can reconstruct the "full" directory is a waste of IO, and noticably slow when run under pseudo. To streamline the required work, a new layout for the "image" input directory gets introduced: - The "full" directory gets created by the caller before invoking swupd-create-update. - For each bundle, instead of a <bundle> directory, there is a <bundle>.content.txt file, listing all entries (including directories) of the bundle. The traditional mode of operation still works as before because each operation which normally works with a bundle directory checks whether there is such a directory and if not, switches to the new mode. That way it is even possible to mix the two modes, i.e. replacing only some bundles with a content list, although that's probably not all that useful. This revised commit fixes the use of an uninitialized newversiondircontent pointer in populate_dirs(). Fixes: swupd-server/clearlinux#54 Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
After setting up compilation without meta-swupd and running "make check", I was able to reproduce the failure. As usual with C, the root cause was a missing pointer initialization in that particular code path. Here's the fix:
Please test and merge PR #55. |
In Ostro OS, we already have a "full" directory with all files. Splitting it up into bundles just so that swupd-create-update can reconstruct the "full" directory is a waste of IO, and noticably slow when run under pseudo. To streamline the required work, a new layout for the "image" input directory gets introduced: - The "full" directory gets created by the caller before invoking swupd-create-update. - For each bundle, instead of a <bundle> directory, there is a <bundle>.content.txt file, listing all entries (including directories) of the bundle. The traditional mode of operation still works as before because each operation which normally works with a bundle directory checks whether there is such a directory and if not, switches to the new mode. That way it is even possible to mix the two modes, i.e. replacing only some bundles with a content list, although that's probably not all that useful. This revised commit fixes the use of an uninitialized newversiondircontent pointer in populate_dirs(). Fixes: swupd-server/#54 Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
looks like this was resolved by #55 ? |
@matthewrsj Yes, I think so. We did not follow up on that PR yet. |
This patch (#45) causes a double free on two tests. Travis-ci is now enabled with the latest commits, so all the tests will be automatically run for following PRs to catch such regressions.
The text was updated successfully, but these errors were encountered: