Show backtraces on sigsegv
This commit is contained in:
parent
bf02682734
commit
dd39f242a2
@ -44,7 +44,6 @@ unique_ref<fspp::OpenFile> CryDir::createAndOpenFile(const string &name, mode_t
|
|||||||
auto child = device()->CreateBlob();
|
auto child = device()->CreateBlob();
|
||||||
Key childkey = child->key();
|
Key childkey = child->key();
|
||||||
(*blob)->AddChildFile(name, childkey, mode, uid, gid);
|
(*blob)->AddChildFile(name, childkey, mode, uid, gid);
|
||||||
//TODO Do we need a return value in createDir for fspp? If not, change fspp Dir interface!
|
|
||||||
auto childblob = FileBlob::InitializeEmptyFile(std::move(child));
|
auto childblob = FileBlob::InitializeEmptyFile(std::move(child));
|
||||||
return make_unique_ref<CryOpenFile>(std::move(childblob));
|
return make_unique_ref<CryOpenFile>(std::move(childblob));
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,6 @@ namespace cryfs {
|
|||||||
|
|
||||||
DirBlob::DirBlob(unique_ref<Blob> blob, CryDevice *device) :
|
DirBlob::DirBlob(unique_ref<Blob> blob, CryDevice *device) :
|
||||||
_device(device), _blob(std::move(blob)), _entries(), _changed(false) {
|
_device(device), _blob(std::move(blob)), _entries(), _changed(false) {
|
||||||
//TODO generally everywhere: asserts are bad, because they crash the filesystem. Rather return a fuse error!
|
|
||||||
ASSERT(magicNumber() == MagicNumbers::DIR, "Loaded blob is not a directory");
|
ASSERT(magicNumber() == MagicNumbers::DIR, "Loaded blob is not a directory");
|
||||||
_readEntriesFromBlob();
|
_readEntriesFromBlob();
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <messmer/cpp-utils/assert/backtrace.h>
|
||||||
|
|
||||||
#include "messmer/fspp/fuse/Fuse.h"
|
#include "messmer/fspp/fuse/Fuse.h"
|
||||||
#include "messmer/fspp/impl/FilesystemImpl.h"
|
#include "messmer/fspp/impl/FilesystemImpl.h"
|
||||||
@ -25,6 +26,8 @@ using std::cout;
|
|||||||
using std::endl;
|
using std::endl;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
|
|
||||||
|
//TODO Support files > 4GB
|
||||||
|
|
||||||
void showVersion() {
|
void showVersion() {
|
||||||
cout << "CryFS Version " << version::VERSION_STRING << endl;
|
cout << "CryFS Version " << version::VERSION_STRING << endl;
|
||||||
if (version::IS_DEV_VERSION) {
|
if (version::IS_DEV_VERSION) {
|
||||||
@ -48,6 +51,8 @@ void runFilesystem(const ProgramOptions &options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
cpputils::showBacktraceOnSigSegv();
|
||||||
|
|
||||||
showVersion();
|
showVersion();
|
||||||
ProgramOptions options = program_options::Parser(argc, argv).parse();
|
ProgramOptions options = program_options::Parser(argc, argv).parse();
|
||||||
runFilesystem(options);
|
runFilesystem(options);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user