- struct library::dwfl_module was left unitialized after
library_clone. Garbage was kept in, which prevented proper
initialization later, and resulted in segmentation violation.
/*
* This file is part of ltrace.
- * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc.
+ * Copyright (C) 2011,2012,2013,2014 Petr Machata, Red Hat Inc.
* Copyright (C) 2001,2009 Juan Cespedes
* Copyright (C) 2006 Ian Wienand
*
* 02110-1301 USA
*/
+#include "config.h"
+
#include <stdlib.h>
#include <string.h>
#include <assert.h>
goto fail;
}
+#if defined(HAVE_LIBDW)
+ /* Wipe DWFL_MODULE, leave it to proc_add_library to
+ * initialize. */
+ lib->dwfl_module = NULL;
+#endif
+
return 0;
}