--- duma-2.5.15.orig/Makefile +++ duma-2.5.15/Makefile @@ -0,0 +1,458 @@ +# +# add "-DDUMA_NO_GLOBAL_MALLOC_FREE" (without quotes) +# for not defining malloc/free in global namespace +# +# add "-DDUMA_EXPLICIT_INIT" (without quotes) +# to do all the "risky" stuff getenv(), sem_init(), write() .. explicitly +# from main(). +# you have to call duma_init() explicitly from main() this option also +# avoids leak error messages for allocations before duma_init() got called. +# this helps for leaky standard environments. +# +# add "-DDUMA_NO_THREAD_SAFETY" (without quotes) +# for not supporting multi-threading +# +# add "-DDUMA_SEMAPHORES" (without quotes) +# for using pthread semaphores +# elseway pthread mutexes get used +# +# add "-DDUMA_SO_NO_CPP_SUPPORT" or "-DDUMA_LIB_NO_CPP_SUPPORT" (without quotes) +# for not directing new/delete to malloc/free +# +# add "-DDUMA_SO_NO_LEAKDETECTION" or "-DDUMA_LIB_NO_LEAKDETECTION" (without quotes) +# if you don't want support for leak detection +# +# add "-DDUMA_SO_PREFER_ATEXIT" or "-DDUMA_LIB_PREFER_ATEXIT" (without quotes) +# if you prefer atexit() over GNU Compiler's function attribute "destructor" +# +# add "-DDUMA_SO_PREFER_GETENV" or "-DDUMA_LIB_PREFER_GETENV" (without quotes) +# if you prefer standard C library getenv() over global char **environ +# +# add "-DDUMA_OLD_NEW_MACRO" (without quotes) +# if you want to use DUMA's old style NEW_ELEM() / NEW_ARRAY() macros. +# when not defining this option, a standard conform new syntax can get used. +# unfortunately you have to use DEL_ELEM/DEL_ARRAY further to utilize +# filename and linenumber of deallocation calls +# +# add "-DDUMA_SO_NO_HANG_MSG" or "-DDUMA_LIB_NO_HANG_MSG" (without quotes) +# set this if you want to suppress the extra messages around atexit(). +# +# add "-DDUMA_NO_STRERROR" (without quotes) +# set this if you want to suppress calls to strerror() to avoid recursion +# on specific platforms. +# +######################################## +# +# preprocessor flags for building the shared library (DUMA_SO_LIBRARY): +# - DUMA_SO_NO_CPP_SUPPORT +# - DUMA_SO_NO_LEAKDETECTION +# - DUMA_SO_PREFER_ATEXIT +# - DUMA_SO_PREFER_GETENV +# - DUMA_SO_NO_HANG_MSG +# +# preprocessor flags for building the static library: +# - DUMA_LIB_NO_CPP_SUPPORT +# - DUMA_LIB_NO_LEAKDETECTION +# - DUMA_LIB_PREFER_ATEXIT +# - DUMA_LIB_PREFER_GETENV +# - DUMA_LIB_NO_HANG_MSG +# - DUMA_NO_GLOBAL_MALLOC_FREE +# - DUMA_EXPLICIT_INIT +# - DUMA_NO_THREAD_SAFETY +# - DUMA_OLD_NEW_MACRO +# - DUMA_OLD_DEL_MACRO +# - DUMA_NO_STRERROR +# +######################################## + +# edit following line +DUMA_OPTIONS = + +# no leak detection on any platform: +# use static library for finding leaks - with information memory was allocated +# i think leak-checking without further information is quite useless! +# additionaly too many platforms/environments are broken. +DUMA_OPTIONS += -DDUMA_SO_NO_LEAKDETECTION + +# some test cases: +#DUMA_OPTIONS += -DDUMA_LIB_NO_LEAKDETECTION +#DUMA_OPTIONS += -DDUMA_NO_THREAD_SAFETY +#DUMA_OPTIONS += -DDUMA_NO_CPP_SUPPORT + +PIC= -fPIC -DPIC +DUMA_SO_OPTIONS = $(PIC) -DDUMA_SO_LIBRARY + +# for FreeBSD 5.4 +# DUMA_OPTIONS += -DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS +# +# for FreeBSD 5.4 if DUMA_EXPLICIT_INIT is not set +# DUMA_OPTIONS += -DDUMA_NO_LEAKDETECTION +# +# for cygwin environment on Windows +# DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT +# also define 'WIN32' + +# some defaults: +CC=gcc +CXX=g++ +AR=ar +RANLIB=ranlib +INSTALL=install +RM=rm +RMFORCE=rm -f +ECHO=echo +ECHOLF=echo + +# dynamic dependencies +DUMA_DYN_DEPS = $(DUMASO) tstheap_so$(EXEPOSTFIX) dumatestpp_so$(EXEPOSTFIX) + +# some OS specific: + +ifeq ($(OS), Windows_NT) + ifeq ($(OSTYPE), msys) + # call mingw32-make OSTYPE=msys + # from Windows command prompt + # having added the PATH for MINGW/bin + # using explicit initialization to avoid leak report + # from __w32_sharedptr_initialize() function + DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT + RM=del + RMFORCE=del /F 2>nul + ECHO=echo + ECHOLF=echo . + CURPATH= + DUMA_DYN_DEPS= + DUMASO= + CFLAGS= -g -O0 + CPPFLAGS= -g -O0 + LIBS= + EXEPOSTFIX=.exe + else + ifeq ($(OSTYPE), cygwin) + # call make OSTYPE=cygwin + DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT + CURPATH=./ + DUMA_DYN_DEPS= + DUMASO= + CFLAGS= -g -O0 -DWIN32 + CPPFLAGS= -g -O0 -DWIN32 + LIBS= + EXEPOSTFIX=.exe + else + DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT + CURPATH=./ + DUMA_DYN_DEPS= + DUMASO= + CFLAGS= -g -O0 -DWIN32 + CPPFLAGS= -g -O0 -DWIN32 + LIBS= + EXEPOSTFIX=.exe + endif + endif +else + ifeq ($(OS), osx) + # tested on darwin 8.0, which is the base for mac-osx + # call: make OS=osx + DUMA_OPTIONS += -DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS + DUMA_OPTIONS += -DDUMA_SO_PREFER_GETENV +# DUMA_OPTIONS += -DDUMA_LIB_NO_LEAKDETECTION + CURPATH=./ +# DUMA_DYN_DEPS= + DUMASO=libduma.dylib + DUMASO_LINK1=libduma.dylib + CFLAGS= -g -O0 + CPPFLAGS= -g -O0 + LIBS=-lpthread + EXEPOSTFIX= + else + ifeq ($(OS), freebsd) + DUMA_OPTIONS += -DDUMA_NO_THREAD_SAFETY + DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT + CURPATH=./ + DUMA_DYN_DEPS= + DUMASO= + DUMASO_LINK1= + CFLAGS= -g -O0 + CPPFLAGS= -g -O0 + LIBS=-lpthread + EXEPOSTFIX= + else + ifeq ($(OS), netbsd) + CURPATH=./ + DUMASO=libduma.so.0.0.0 + DUMASO_LINK1=libduma.so.0 + DUMASO_LINK2=libduma.so + CFLAGS= -g -O0 + CPPFLAGS= -g -O0 + LIBS=-lpthread + EXEPOSTFIX= + else + ifeq ($(OS), solaris) + DUMA_OPTIONS += -DDUMA_NO_STRERROR + CURPATH=./ + DUMA_DYN_DEPS= + DUMASO=libduma.so.0.0.0 + DUMASO_LINK1=libduma.so.0 + DUMASO_LINK2=libduma.so + CFLAGS= -g -O0 + CPPFLAGS= -g -O0 + LDFLAGS+=-lgcc_s + LDOPTIONS+=-lgcc_s + LIBS=-Wl,-R/opt/sfw/lib -lpthread + EXEPOSTFIX= + else + # default is Linux or other full Unix + CURPATH=./ + DUMASO=libduma.so.0.0.0 + DUMASO_LINK1=libduma.so.0 + DUMASO_LINK2=libduma.so + CFLAGS= -g -O0 -Wall + CPPFLAGS= -g -O0 -Wall + LIBS=-lpthread + EXEPOSTFIX= + endif + endif + endif + endif +endif + + +############################################################ + +prefix=/usr +BIN_INSTALL_DIR=$(prefix)/bin +LIB_INSTALL_DIR=$(prefix)/lib +MAN_INSTALL_DIR=$(prefix)/share/man/man3 +INC_INSTALL_DIR=$(prefix)/include +DOC_INSTALL_DIR=$(prefix)/share/doc/duma + +PACKAGE_SOURCE= README.txt CHANGELOG COPYING-GPL COPYING-LGPL duma.3 Makefile gdbinit.rc \ + duma.h dumapp.h duma_sem.h paging.h print.h duma_hlp.h noduma.h \ + duma.c dumapp.cpp sem_inc.c print.c \ + dumatest.c tstheap.c thread-test.c testmt.c dumatestpp.cpp testoperators.cpp \ + createconf.c + +OBJECTS = dumapp.o duma.o sem_inc.o print.o + +SO_OBJECTS = dumapp_so.o duma_so.o sem_inc_so.o print_so.o + +all: libduma.a tstheap$(EXEPOSTFIX) dumatest$(EXEPOSTFIX) thread-test$(EXEPOSTFIX) testmt$(EXEPOSTFIX) dumatestpp$(EXEPOSTFIX) testoperators$(EXEPOSTFIX) $(DUMA_DYN_DEPS) + +test: + @ $(ECHOLF) + @ $(ECHO) "Testing DUMA (static library):" + $(CURPATH)dumatest$(EXEPOSTFIX) + $(CURPATH)tstheap$(EXEPOSTFIX) 3072 + $(CURPATH)testoperators$(EXEPOSTFIX) + @ $(ECHOLF) + @ $(ECHO) "DUMA static confidence test PASSED." +ifdef DUMASO + @ $(ECHOLF) + @ $(ECHO) "Testing DUMA (dynamic library)." +ifeq ($(OS), solaris) + (LD_PRELOAD=./$(DUMASO) DYLD_INSERT_LIBRARIES=./$(DUMASO) DYLD_FORCE_FLAT_NAMESPACE=1 exec $(CURPATH)tstheap_so 3072) +else + (export LD_PRELOAD=./$(DUMASO); export DYLD_INSERT_LIBRARIES=./$(DUMASO); export DYLD_FORCE_FLAT_NAMESPACE=1; exec $(CURPATH)tstheap_so 3072) +endif + @ $(ECHOLF) + @ $(ECHO) "DUMA dynamic confidence test PASSED." + @ $(ECHOLF) +endif + +install: libduma.a duma.3 $(DUMASO) + - mkdir -p $(DESTDIR)$(DOC_INSTALL_DIR) + $(INSTALL) -m 644 README.txt $(DESTDIR)$(DOC_INSTALL_DIR) + - mkdir -p $(DESTDIR)$(INC_INSTALL_DIR) + $(INSTALL) -m 644 noduma.h duma.h dumapp.h duma_sem.h duma_config.h $(DESTDIR)$(INC_INSTALL_DIR) + - mkdir -p $(DESTDIR)$(BIN_INSTALL_DIR) + $(INSTALL) -m 755 duma.sh $(DESTDIR)$(BIN_INSTALL_DIR)/duma + - mkdir -p $(DESTDIR)$(LIB_INSTALL_DIR) + $(INSTALL) -m 644 libduma.a $(DESTDIR)$(LIB_INSTALL_DIR) +ifdef DUMASO + $(INSTALL) -m 755 $(DUMASO) $(DESTDIR)$(LIB_INSTALL_DIR) +endif +ifdef DUMASO_LINK1 + - $(RMFORCE) $(DESTDIR)$(LIB_INSTALL_DIR)/$(DUMASO_LINK1) + ln -s $(DUMASO) $(DESTDIR)$(LIB_INSTALL_DIR)/$(DUMASO_LINK1) +endif +ifdef DUMASO_LINK2 + - $(RMFORCE) $(DESTDIR)$(LIB_INSTALL_DIR)/$(DUMASO_LINK2) + ln -s $(DUMASO) $(DESTDIR)$(LIB_INSTALL_DIR)/$(DUMASO_LINK2) +endif + - mkdir -p $(DESTDIR)$(MAN_INSTALL_DIR) + $(INSTALL) -m 644 duma.3 $(DESTDIR)$(MAN_INSTALL_DIR)/duma.3 + +clean: + - $(RMFORCE) $(OBJECTS) $(SO_OBJECTS) tstheap.o dumatest.o thread-test.o testmt.o dumatestpp.o \ + tstheap_so.o dumatestpp_so.o testoperators.o \ + tstheap$(EXEPOSTFIX) tstheap_so$(EXEPOSTFIX) dumatest$(EXEPOSTFIX) dumatestpp$(EXEPOSTFIX) dumatestpp_so$(EXEPOSTFIX) testoperators$(EXEPOSTFIX) \ + thread-test$(EXEPOSTFIX) testmt$(EXEPOSTFIX) \ + libduma.a $(DUMASO) libduma.cat DUMA.shar + +distclean clobber: clean + - $(RMFORCE) duma_config.h createconf.o createconf$(EXEPOSTFIX) + +roff: + nroff -man < duma.3 > duma.cat + + +DUMA.shar: $(PACKAGE_SOURCE) + shar $(PACKAGE_SOURCE) > DUMA.shar + +shar: DUMA.shar + +libduma.a: duma_config.h $(OBJECTS) + - $(RMFORCE) libduma.a + $(AR) crv libduma.a $(OBJECTS) + $(RANLIB) libduma.a + +duma_config.h: + $(MAKE) reconfig + +reconfig: createconf$(EXEPOSTFIX) createconf.o createconf.c + - $(CURPATH)createconf$(EXEPOSTFIX) + +dos2unix: + @ dos2unix --d2u $(PACKAGE_SOURCE) + +createconf$(EXEPOSTFIX): createconf.o + - $(RMFORCE) createconf$(EXEPOSTFIX) + $(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX) + +tstheap$(EXEPOSTFIX): libduma.a tstheap.o + - $(RMFORCE) tstheap$(EXEPOSTFIX) + $(CC) $(CFLAGS) tstheap.o libduma.a -o tstheap$(EXEPOSTFIX) $(LIBS) + +dumatest$(EXEPOSTFIX): libduma.a dumatest.o + - $(RMFORCE) dumatest$(EXEPOSTFIX) + $(CC) $(CFLAGS) dumatest.o libduma.a -o dumatest$(EXEPOSTFIX) $(LIBS) + +dumatestpp$(EXEPOSTFIX): libduma.a dumatestpp.o duma_sem.h dumapp.h + - $(RMFORCE) dumatestpp$(EXEPOSTFIX) + $(CXX) $(CPPFLAGS) dumatestpp.o libduma.a -o dumatestpp$(EXEPOSTFIX) $(LIBS) + +thread-test$(EXEPOSTFIX): libduma.a thread-test.o + - $(RMFORCE) thread-test$(EXEPOSTFIX) + $(CC) $(CFLAGS) thread-test.o libduma.a -o thread-test$(EXEPOSTFIX) $(LIBS) + +testmt$(EXEPOSTFIX): libduma.a testmt.o + - $(RMFORCE) testmt$(EXEPOSTFIX) + $(CC) $(CFLAGS) testmt.o libduma.a -o testmt$(EXEPOSTFIX) $(LIBS) + +testoperators$(EXEPOSTFIX): libduma.a testoperators.o duma_sem.h dumapp.h + - $(RMFORCE) testoperators$(EXEPOSTFIX) + $(CXX) $(CPPFLAGS) testoperators.o libduma.a -o testoperators$(EXEPOSTFIX) $(LIBS) + +tstheap_so$(EXEPOSTFIX): tstheap_so.o + - $(RMFORCE) tstheap_so$(EXEPOSTFIX) + $(CC) $(CFLAGS) tstheap_so.o -o tstheap_so$(EXEPOSTFIX) $(LIBS) + +dumatestpp_so$(EXEPOSTFIX): dumatestpp_so.o + - $(RMFORCE) dumatestpp_so$(EXEPOSTFIX) + $(CXX) $(CPPFLAGS) dumatestpp_so.o -o dumatestpp_so$(EXEPOSTFIX) $(LIBS) + + +$(OBJECTS) tstheap.o dumatest.o thread-test.o testmt.o dumatestpp.o: duma.h + +ifeq ($(OS), Windows_NT) + # do nothing +else + ifeq ($(OS), osx) + +$(DUMASO): duma_config.h $(SO_OBJECTS) + $(CXX) -g -dynamiclib -Wl -o $(DUMASO) $(SO_OBJECTS) -lpthread -lc + $(CXX) -g -dynamiclib -o $(DUMASO) $(SO_OBJECTS) -lpthread -lc + + else + +$(DUMASO): duma_config.h $(SO_OBJECTS) + $(CXX) -g -shared -Wl,-soname,$(DUMASO) -o $(DUMASO) $(SO_OBJECTS) -lpthread -lc +# $(CXX) -g -shared -o $(DUMASO) $(SO_OBJECTS) -lpthread -lc + + endif + +endif + + +# +# define rules how to build objects for createconf +# +createconf.o: + $(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@ + + +# +# define rules how to build objects for shared library +# + +dumapp_so.o: dumapp.cpp duma.h duma_sem.h dumapp.h + $(CXX) $(CPPFLAGS) $(DUMA_SO_OPTIONS) -c dumapp.cpp -o $@ + +duma_so.o: duma.c duma.h duma_config.h + $(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c duma.c -o $@ + +sem_inc_so.o: sem_inc.c duma_sem.h + $(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c sem_inc.c -o $@ + +print_so.o: print.c print.h + $(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c print.c -o $@ + +# DUMA_SO_OPTIONS needed cause duma.h is included explicitly +tstheap_so.o: + $(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c tstheap.c -o $@ + +dumatestpp_so.o: + $(CXX) $(CPPFLAGS) $(DUMA_SO_OPTIONS) -c dumatestpp.cpp -o $@ + +# +# define rules how to build objects for static library +# + +dumapp.o: dumapp.cpp duma.h duma_sem.h dumapp.h + $(CXX) $(CPPFLAGS) -c dumapp.cpp -o $@ + +duma.o: duma.c duma.h duma_config.h + $(CC) $(CFLAGS) -c duma.c -o $@ + +sem_inc.o: sem_inc.c duma_sem.h + $(CC) $(CFLAGS) -c sem_inc.c -o $@ + +print.o: print.c print.h + $(CC) $(CFLAGS) -c print.c -o $@ + + +# +# define rules how to build the test objects +# + +dumatest.o: dumatest.c duma.h duma_config.h + $(CC) $(CFLAGS) -c dumatest.c -o $@ + +dumatestpp.o: dumatestpp.cpp duma.h duma_sem.h dumapp.h duma_config.h + $(CXX) $(CPPFLAGS) -c dumatestpp.cpp -o $@ + +tstheap.o: tstheap.c duma.h duma_config.h + $(CC) $(CFLAGS) -c tstheap.c -o $@ + +testoperators.o: testoperators.cpp duma.h duma_sem.h dumapp.h duma_config.h + $(CXX) $(CPPFLAGS) -c testoperators.cpp -o $@ + +thread-test.o: thread-test.c duma.h duma_config.h + $(CC) $(CFLAGS) -c thread-test.c -o $@ + +testmt.o: testmt.c duma.h duma_config.h + $(CC) $(CFLAGS) -c testmt.c -o $@ + + +# +# default rules +# +#.c.o: +# $(CC) $(CFLAGS) -c $< -o $@ +# +#.cpp.o: +# $(CXX) $(CPPFLAGS) -c $< -o $@ +# + +.PHONY: test install clean distclean dos2unix + --- duma-2.5.15.orig/debian/changelog +++ duma-2.5.15/debian/changelog @@ -1,40 +1,61 @@ -electric-fence (2.0.5-4.1) unstable; urgency=low +duma (2.5.15-1.1ubuntu2) zesty; urgency=medium - * Orphaned the package: - (Siggy Brentrup has left the project a long while ago) - * Now point to the correct manpage (Fix #8122). - * upstream changelog file named correctly (Fix #9618). - * Now point to the upstream location (Fix #17354, #28059). - * Don't install libefence.so.0 executable (Fix #25993). + * dumapp.{cpp,h}: Apply patch from Buildroot (thanks, Yann E. MORIN!) to fix + FTBFS with C++14. - -- Vincent Renardias Wed, 13 Jan 1999 01:41:31 +0100 + -- Logan Rosen Sat, 24 Dec 2016 17:23:27 -0500 -electric-fence (2.0.5-4) unstable; urgency=low +duma (2.5.15-1.1ubuntu1) maverick; urgency=low - * recompiled for libc6; added an extra condition around the sys_errlist - declaration. - * added a libefence.so.0.0 shared library. - * non-maintainer release. - - -- joost witteveen Fri, 19 Sep 1997 15:11:31 +0200 + * Merge from debian unstable (LP: #599142), remaining changes: + - add CFLAGS+="-U_FORTIFY_SOURCE" in debian/rules since Ubuntu + default -D_FORTIFY_SOURCE=2 clashes with duma overloading all + standard memory allocation functions -electric-fence (2.0.5-3) unstable; urgency=low + -- Lorenzo De Liso Sun, 27 Jun 2010 23:26:38 +0200 - * Changed to new package format (Bug #7118) - * Added extended description (Bug #3582) - * Multi-architecture support (hopefully) (Bug #4045) +duma (2.5.15-1.1) unstable; urgency=low - -- Siggy Brentrup Wed, 5 Feb 1997 17:17:17 +0100 + * Non-maintainer upload. + * Remove needless usr/doc/electric-fence and usr/man/man3 from debian/dirs + (Closes: #553093) -electric-fence (2.0.5-2) unstable; urgency=low + -- Johann Felix Soden Fri, 27 Nov 2009 23:45:01 +0100 - * converted to ELF directory structure - * cleaned up debian.control - * minor changes to debian.rules +duma (2.5.15-1ubuntu1) karmic; urgency=low - -- Siggy Brentrup Wed, 20 Jan 1996 00:00:00 +0100 + * Merge from debian unstable (LP: #388935), remaining changes: + - add CFLAGS+="-U_FORTIFY_SOURCE" in debian/rules since Ubuntu + default -D_FORTIFY_SOURCE=2 clashes with duma overloading all + standard memory allocation functions + + -- Ilya Barygin Thu, 18 Jun 2009 15:25:20 +0400 + +duma (2.5.15-1) unstable; urgency=low + + * New upstream release (Closes: #531169) + * Bump standard version + + -- Julien Danjou Thu, 04 Jun 2009 14:12:00 +0200 + +duma (2.5.14-2ubuntu1) jaunty; urgency=low + + * Fix FTBS (LP: #309732): + add CFLAGS+="-U_FORTIFY_SOURCE" in debian/rules since Ubuntu + default -D_FORTIFY_SOURCE=2 clashes with duma overloading all + standard memory allocation functions. + + -- Cesare Tirabassi Fri, 19 Dec 2008 18:22:32 +0100 + +duma (2.5.14-2) unstable; urgency=low + + * Fix typo in long description (Closes: #486736) + + -- Julien Danjou Wed, 18 Jun 2008 00:09:42 +0200 + +duma (2.5.14-1) unstable; urgency=low + + * Initial release (Closes: #484473) + + -- Julien Danjou Thu, 12 Jun 2008 11:23:57 +0200 -Local variables: -mode: debian-changelog -add-log-mailing-address: "bsb@debian.org" -End: --- duma-2.5.15.orig/debian/compat +++ duma-2.5.15/debian/compat @@ -0,0 +1 @@ +6 --- duma-2.5.15.orig/debian/control +++ duma-2.5.15/debian/control @@ -1,11 +1,38 @@ -Source: electric-fence +Source: duma Section: devel Priority: extra -Maintainer: Debian QA Group -Standards-Version: 2.1.2.2 +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Julien Danjou +Build-Depends: cdbs, debhelper (>= 6) +Standards-Version: 3.8.1 +Homepage: http://duma.sf.net +Vcs-Git: git://git.debian.org/git/users/acid/duma.git +Vcs-Browser: http://git.debian.org/?p=users/acid/duma.git -Package: electric-fence +Package: duma Architecture: any -Description: A malloc(3) debugger - Use virtual memory hardware to detect illegal memory accesses. - +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: library to detect buffer overruns and under-runs in C and C++ programs + Open-source library to detect buffer overruns and under-runs + in C and C++ programs. + . + This library is a fork of Bruce Perens Electric Fence library and adds + some new features to it. Features of the DUMA library: + * "overloads" all standard memory allocation functions like + malloc(), calloc(), memalign(), strdup(), operator new, operator + new[] and also their counterpart deallocation functions like free(), + operator delete and operator delete[] + * utilizes the MMU (memory management unit) of the CPU: + allocates and protects an extra memory page to detect any illegal + access beyond the top of the buffer (or bottom, at the user's option) + * stops the program at exactly that instruction, which does the + erroneous access to the protected memory page, + allowing location of the defective source code in a debugger + detects erroneous writes at the non-protected end of the memory + block at deallocation of the memory block + * detects mismatch of allocation/deallocation functions: f.e. + allocation with malloc() but deallocation with operator delete + * leak detection: detect memory blocks which were not deallocated + until program exit + * preloading of the library + * allowing tests without necessity of changing source code or recompilation --- duma-2.5.15.orig/debian/copyright +++ duma-2.5.15/debian/copyright @@ -1,12 +1,37 @@ -This package was debianized by Siggy Brentrup bsb@debian.org on -Wed, 5 Feb 1997 15:53:23 +0100. +This package was debianized by Julien Danjou on +Thu, 12 Jun 2008 11:23:57 +0200. -The canonical version of the source code is available at -http://perens.com/FreeSoftware/ElectricFence . +It was downloaded from -Copyright: +Upstream Authors: -(c) 1987-1999 Bruce Perens -The program is distributed under the GNU General Public License which -can be found in the file COPYING. + Hayati Ayguen + Michael Eddington +Copyright: + + Copyright (C) 2006 Michael Eddington + Copyright (C) 2002-2007 Hayati Ayguen , Procitec GmbH + Copyright (C) 1987-1999 Bruce Perens + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2008, Julien Danjou and +is licensed under the GPL, see above. --- duma-2.5.15.orig/debian/dirs +++ duma-2.5.15/debian/dirs @@ -1,3 +1 @@ usr/lib -usr/doc/electric-fence -usr/man/man3 --- duma-2.5.15.orig/debian/docs +++ duma-2.5.15/debian/docs @@ -0,0 +1,2 @@ +README.txt +TODO --- duma-2.5.15.orig/debian/rules +++ duma-2.5.15/debian/rules @@ -1,67 +1,11 @@ #!/usr/bin/make -f -# Sample debian.rules file - for GNU Hello (1.3). -# Copyright 1994,1995 by Ian Jackson. -# I hereby give you perpetual unlimited permission to copy, -# modify and relicense this file, provided that you do not remove - # my name from the file itself. (I assert my moral right of -# paternity under the Copyright, Designs and Patents Act 1988.) -# This file may have to be extensively modified -# -# Modified to be a prototype for debmake by Christoph Lameter -package=electric-fence +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/makefile.mk -build: - $(checkdir) - if [ -x configure ]; then ./configure --prefix=/usr; fi - make CFLAGS="-O2 -g -Wall" - rm *.o - make CFLAGS="-O2 -g -Wall -fPIC" libefence.so.0.0 - touch build +DEB_MAKE_INSTALL_TARGET=install prefix=$(DEB_DESTDIR)/usr -clean: - $(checkdir) - rm -f build - rm -f libefence.so.0.0 - -make clean - -rm -f `find . -name "*~"` - -rm -rf debian/tmp debian/files* core debian/substvars +CFLAGS+="-U_FORTIFY_SOURCE" -binary-indep: checkroot build - $(checkdir) -# There are no architecture-independent files to be uploaded -# generated by this package. If there were any they would be -# made here. - -binary-arch: checkroot build - $(checkdir) - -rm -rf debian/tmp - install -d debian/tmp - cd debian/tmp;install -d `cat ../dirs` - make install prefix=`pwd`/debian/tmp/usr - install -m 644 -o root -g root libefence.so.0.0 debian/tmp/usr/lib - -# Must have debmake installed for this to work. Otherwise please copy -# /usr/bin/debstd into the debian directory and change debstd to debian/debstd - debstd CHANGES README - dpkg-gencontrol - chown -R root.root debian/tmp - chmod -R go=rX debian/tmp - dpkg --build debian/tmp .. - -define checkdir - test -f debian/rules -endef - -# Below here is fairly generic really - -binary: binary-indep binary-arch - -source diff: - @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false - -checkroot: - $(checkdir) - test root = "`whoami`" - -.PHONY: binary binary-arch binary-indep clean checkroot +cleanbuilddir:: + rm -rf createconf createconf.o --- duma-2.5.15.orig/debian/watch +++ duma-2.5.15/debian/watch @@ -0,0 +1,3 @@ +version=3 + +http://sf.net/duma/duma-(.*)\.tar\.gz --- duma-2.5.15.orig/duma_config.h +++ duma-2.5.15/duma_config.h @@ -0,0 +1,216 @@ +/* + * WARNING: DO NOT CHANGE THIS FILE! + * This file is automatically generated from createconf + * under Linux the Jun 4 2009 + */ + +#ifndef _DUMA_CONFIG_H_ +#define _DUMA_CONFIG_H_ + +/* + * Configuration of DUMA: + */ +#ifdef DUMA_SO_LIBRARY + +#ifdef DUMA_NO_GLOBAL_MALLOC_FREE +#undef DUMA_NO_GLOBAL_MALLOC_FREE +#endif + +#ifdef DUMA_EXPLICIT_INIT +#undef DUMA_EXPLICIT_INIT +#endif + +#ifdef DUMA_NO_THREAD_SAFETY +#undef DUMA_NO_THREAD_SAFETY +#endif + +#ifdef DUMA_SEMAPHORES +#undef DUMA_SEMAPHORES +#endif + +#ifdef DUMA_NO_CPP_SUPPORT +#undef DUMA_NO_CPP_SUPPORT +#endif + +#ifndef DUMA_NO_LEAKDETECTION +#define DUMA_NO_LEAKDETECTION +#endif + +#ifdef DUMA_PREFER_ATEXIT +#undef DUMA_PREFER_ATEXIT +#endif + +#ifdef DUMA_PREFER_GETENV +#undef DUMA_PREFER_GETENV +#endif + +#ifdef DUMA_OLD_NEW_MACRO +#undef DUMA_OLD_NEW_MACRO +#endif + +#ifdef DUMA_OLD_DEL_MACRO +#undef DUMA_OLD_DEL_MACRO +#endif + +#ifdef DUMA_NO_STRERROR +#undef DUMA_NO_STRERROR +#endif + +#ifdef DUMA_NO_HANG_MSG +#undef DUMA_NO_HANG_MSG +#endif + +#elif defined(DUMA_DLL_LIBRARY) + +#define DUMA_SKIP_SETUP 1 +#define DUMA_NO_GLOBAL_MALLOC_FREE 1 +#define DUMA_EXPLICIT_INIT 1 +#ifdef DUMA_NO_THREAD_SAFETY +#undef DUMA_NO_THREAD_SAFETY +#endif + +#ifdef DUMA_NO_CPP_SUPPORT +#undef DUMA_NO_CPP_SUPPORT +#endif + +#ifndef DUMA_NO_LEAKDETECTION +#define DUMA_NO_LEAKDETECTION +#endif + +#ifdef DUMA_PREFER_ATEXIT +#undef DUMA_PREFER_ATEXIT +#endif + +#ifdef DUMA_PREFER_GETENV +#undef DUMA_PREFER_GETENV +#endif + +#ifdef DUMA_OLD_NEW_MACRO +#undef DUMA_OLD_NEW_MACRO +#endif + +#ifdef DUMA_OLD_DEL_MACRO +#undef DUMA_OLD_DEL_MACRO +#endif + +#ifdef DUMA_NO_HANG_MSG +#undef DUMA_NO_HANG_MSG +#endif + +#elif defined(DUMA_DETOURS) + +#define DUMA_SKIP_SETUP 1 +#define DUMA_NO_GLOBAL_MALLOC_FREE 1 +#define DUMA_EXPLICIT_INIT 1 +#ifdef DUMA_NO_THREAD_SAFETY +#undef DUMA_NO_THREAD_SAFETY +#endif + +#ifdef DUMA_NO_CPP_SUPPORT +#undef DUMA_NO_CPP_SUPPORT +#endif + +#ifndef DUMA_NO_LEAKDETECTION +#define DUMA_NO_LEAKDETECTION +#endif + +#ifdef DUMA_PREFER_ATEXIT +#undef DUMA_PREFER_ATEXIT +#endif + +#ifdef DUMA_PREFER_GETENV +#undef DUMA_PREFER_GETENV +#endif + +#ifdef DUMA_OLD_NEW_MACRO +#undef DUMA_OLD_NEW_MACRO +#endif + +#ifdef DUMA_OLD_DEL_MACRO +#undef DUMA_OLD_DEL_MACRO +#endif + +#ifdef DUMA_NO_HANG_MSG +#undef DUMA_NO_HANG_MSG +#endif + +#else + +#ifdef DUMA_NO_GLOBAL_MALLOC_FREE +#undef DUMA_NO_GLOBAL_MALLOC_FREE +#endif + +#ifdef DUMA_EXPLICIT_INIT +#undef DUMA_EXPLICIT_INIT +#endif + +#ifdef DUMA_NO_THREAD_SAFETY +#undef DUMA_NO_THREAD_SAFETY +#endif + +#ifdef DUMA_NO_CPP_SUPPORT +#undef DUMA_NO_CPP_SUPPORT +#endif + +#ifdef DUMA_NO_LEAKDETECTION +#undef DUMA_NO_LEAKDETECTION +#endif + +#ifdef DUMA_PREFER_ATEXIT +#undef DUMA_PREFER_ATEXIT +#endif + +#ifdef DUMA_PREFER_GETENV +#undef DUMA_PREFER_GETENV +#endif + +#ifdef DUMA_OLD_NEW_MACRO +#undef DUMA_OLD_NEW_MACRO +#endif + +#ifdef DUMA_OLD_DEL_MACRO +#undef DUMA_OLD_DEL_MACRO +#endif + +#ifdef DUMA_NO_STRERROR +#undef DUMA_NO_STRERROR +#endif + +#ifdef DUMA_NO_HANG_MSG +#undef DUMA_NO_HANG_MSG +#endif + +#endif + + +/* + * Number of bytes per virtual-memory page, as returned by Page_Size(). + */ +#define DUMA_PAGE_SIZE 4096 + +/* + * Minimum required alignment by CPU. + */ +#define DUMA_MIN_ALIGNMENT 1 + +/* + * Build environment supports the '__attribute ((constructor))'? + */ +#define DUMA_GNU_INIT_ATTR 1 + +/* + * An integer type with same size as 'void *' + */ +typedef unsigned long int DUMA_ADDR; + +/* + * An integer type with same size as 'size_t' + */ +typedef unsigned long int DUMA_SIZE; + +/* + * Default behaviour on malloc(0). + */ +#define DUMA_DEFAULT_MALLOC_0_STRATEGY 3 + +#endif /* _DUMA_CONFIG_H_ */ --- duma-2.5.15.orig/dumapp.cpp +++ duma-2.5.15/dumapp.cpp @@ -190,7 +190,9 @@ * (11) = (a) ; ASW */ void * DUMA_CDECL operator new( DUMA_SIZE_T size ) +#ifdef DUMA_EXCEPTION_SPECS throw(std::bad_alloc) +#endif { return duma_new_operator(size, EFA_NEW_ELEM, true DUMA_PARAMS_UK); } @@ -254,7 +256,9 @@ * (21) = (a) ; AAW */ void * DUMA_CDECL operator new[]( DUMA_SIZE_T size ) +#ifdef DUMA_EXCEPTION_SPECS throw(std::bad_alloc) +#endif { return duma_new_operator(size, EFA_NEW_ARRAY, true DUMA_PARAMS_UK); } --- duma-2.5.15.orig/dumapp.h +++ duma-2.5.15/dumapp.h @@ -35,6 +35,10 @@ #include "duma.h" +#if __cplusplus < 201103L + #define DUMA_EXCEPTION_SPECS 1 +#endif + /* remove previous macro definitions */ #include "noduma.h"