blob: c109a7c2856e06cebe4c9ab7080822359f60084c [file] [log] [blame]
--- crashme-2.4.orig/crashme.1
+++ crashme-2.4/crashme.1
@@ -1,4 +1,4 @@
-.TH CRASHME 1C LOCAL
+.TH CRASHME 1 LOCAL
.SH NAME
crashme \- test operating environment software robustness
.SH SYNOPSIS
--- crashme-2.4.orig/debian/copyright
+++ crashme-2.4/debian/copyright
@@ -0,0 +1,25 @@
+This package was created by Jay Kominek <jkominek@debian.org> on Sunday
+the 7th of June, 1998.
+
+The copyright for crashme is as follows, taken verbatim from crashme.c:
+
+ *
+ * COPYRIGHT (c) 1990-1994 BY *
+ * GEORGE J. CARRETTE, CONCORD, MASSACHUSETTS. *
+ * ALL RIGHTS RESERVED *
+
+Permission to use, copy, modify, distribute and sell this software
+and its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all copies
+and that both that copyright notice and this permission notice appear
+in supporting documentation, and that the name of the author
+not be used in advertising or publicity pertaining to distribution
+of the software without specific, written prior permission.
+
+THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+HE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
--- crashme-2.4.orig/debian/README.debian
+++ crashme-2.4/debian/README.debian
@@ -0,0 +1,23 @@
+ _
+ ___ _ __ __ _ ___| |__ _ __ ___ ___
+ / __| '__/ _` / __| '_ \| '_ ` _ \ / _ \
+| (__| | | (_| \__ \ | | | | | | | | __/
+ \___|_| \__,_|___/_| |_|_| |_| |_|\___|
+ ... for Debian!
+
+ So, you want to crash your computer, but pulling the processor out is
+getting boring? crashme is for you! crashme works by generating strings of
+random bytes, and then (here is the fun part) trying to execute the
+bytes!
+
+*** WARNING ***
+ If you run crashme, your system could very well crash. YOU COULD LOSE
+YOUR ALL OF YOUR DATA!!! I (Jay Kominek), the author of crashme, Debian,
+SPI and its officers take no responsibility if you lose data by running
+crashme. Note: crashme is installed into /usr/bin, world executable.
+Joe Random User could very well execute it and crash your system!
+
+
+ --- Jay Kominek
+ jkominek@debian.org
+ jfk@acm.org
--- crashme-2.4.orig/debian/compat
+++ crashme-2.4/debian/compat
@@ -0,0 +1 @@
+4
--- crashme-2.4.orig/debian/rules
+++ crashme-2.4/debian/rules
@@ -0,0 +1,46 @@
+#!/usr/bin/make -f
+# Originally generated by debmake, and then converted to use debhelper
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+CFLAGS = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+build: crashme
+
+clean:
+ dh_testdir
+ dh_testroot
+
+ rm -f crashme
+
+ dh_clean
+
+binary-indep:
+# Nothing to do
+
+binary-arch: build
+ dh_testdir
+ dh_testroot
+ dh_clean
+ dh_installdirs
+ dh_install crashme usr/bin
+ dh_installdocs crashme.html
+ dh_installman crashme.1
+ dh_installchangelogs
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary
--- crashme-2.4.orig/debian/control
+++ crashme-2.4/debian/control
@@ -0,0 +1,17 @@
+Source: crashme
+Section: devel
+Priority: optional
+Maintainer: Aurélien GÉRÔME <ag@roxor.cx>
+Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 4)
+
+Package: crashme
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Stress tests operating system stability
+ crashme generates strings of random bytes and then attempts to execute
+ them. Used to test kernel stability.
+ .
+ **WARNING** While Linux has been known to survive days and weeks of crashme,
+ IT IS NOT GUARANTEED THAT YOUR SYSTEM WILL SURVIVE! DO NOT USE THIS PROGRAM
+ UNLESS YOU REALLY WANT TO CRASH YOUR COMPUTER
--- crashme-2.4.orig/debian/changelog
+++ crashme-2.4/debian/changelog
@@ -0,0 +1,75 @@
+crashme (2.4-9) unstable; urgency=low
+
+ * Adopt the package (Closes: #353388).
+ * Conform to policy with CFLAGS set to "-O2 -g -Wall".
+ * Fix resulting gcc warnings from turning on "-Wall".
+
+ -- Aurélien GÉRÔME <ag@roxor.cx> Mon, 31 Jul 2006 14:41:43 +0200
+
+crashme (2.4-8) unstable; urgency=low
+
+ * QA upload.
+ * debian/postinst: Remove; /usr/doc already handled by the old prerm.
+ * debian/rules:
+ - Add support for DEB_BUILD_OPTIONS=noopt.
+ - Use dh_install.
+
+ -- Matej Vela <vela@debian.org> Sun, 30 Jul 2006 22:14:56 +0200
+
+crashme (2.4-7) unstable; urgency=low
+
+ * QA upload.
+ * s/PAQUETE/crashme/g in postinst. Sorry
+
+ -- Amaya Rodrigo Sastre <amaya@debian.org> Wed, 12 Jul 2006 21:44:04 +0200
+
+crashme (2.4-6) unstable; urgency=low
+
+ * QA upload.
+ * This package is orphaned as of #353388, so setting the Maintainer field
+ accordingly to QA.
+ * Fix typo in package description (Closes: #363215).
+ * Get rid of the /usr/doc link (Closes: #359371).
+ * Stop echoing warnings and stuff on console in postinst. Debconf should be
+ used instead. Somebody please fix this.
+ * Bumped Standards version to 3.7.2. No changes needed.
+ * Fixed manual section
+
+ -- Amaya Rodrigo Sastre <amaya@debian.org> Wed, 12 Jul 2006 18:47:31 +0200
+
+crashme (2.4-5) unstable; urgency=low
+
+ * New maintainer (Closes: #81889)
+ * Bump up Standards-Version
+ * Add Build-Depends (Closes: #70344)
+ * Remove pddet from the package since it has no manpage and does not seem to
+ be useful, even for the build process.
+
+ -- Aaron Lehmann <aaronl@vitelus.com> Wed, 10 Jan 2001 19:29:36 -0800
+
+crashme (2.4-4) unstable; urgency=low
+
+ * Replaced execl call with execlp. (Fixes bug #37304)
+ * Removed access to an obsolete structure member. (Fixes bug #37446)
+
+ -- Jay Kominek <jay.kominek@colorado.edu> Tue, 25 May 1999 09:32:17 -0600
+
+crashme (2.4-3) unstable; urgency=low
+
+ * Switched binary-arch and binary-indep to what they should be.
+ (Fixes bug #25452)
+
+ -- Jay Kominek <jkominek@debian.org> Thu, 6 Aug 1998 03:34:49 -0600
+
+crashme (2.4-2) unstable; urgency=low
+
+ * Changed extended package description to format sanely in dselect.
+ (Fixes bug #23666)
+
+ -- Jay Kominek <jkominek@debian.org> Thu, 18 Jun 1998 02:57:30 -0400
+
+crashme (2.4-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Jay Kominek <jkominek@debian.org> Sat, 6 Jun 1998 19:12:44 -0400
--- crashme-2.4.orig/crashme.c
+++ crashme-2.4/crashme.c
@@ -151,6 +151,8 @@
#include <unistd.h>
#endif
+#include <sys/wait.h>
+
typedef void (*BADBOY)();
BADBOY badboy;
@@ -260,10 +262,7 @@
#else
struct sigaction act;
act.sa_handler = func;
- act.sa_mask = 0;
-#ifdef linux
- act.sa_restorer = 0;
-#endif /* linux */
+ bzero(&act.sa_mask,sizeof(sigset_t));
act.sa_flags = SA_NOMASK;
#ifdef SA_RESTART
act.sa_flags |= SA_RESTART;
@@ -272,7 +271,7 @@
#endif /* SA_ONESHOT */
}
-set_up_signals()
+void set_up_signals()
{my_signal(SIGILL,again_handler);
#ifdef SIGTRAP
my_signal(SIGTRAP,again_handler);
@@ -295,7 +294,7 @@
#endif
-compute_badboy_1(n)
+void compute_badboy_1(n)
long n;
{long j;
if (malloc_flag == 1)
@@ -347,7 +346,7 @@
#endif
return((BADBOY)dat);}
-compute_badboy()
+void compute_badboy()
{long n;
n = (nbytes < 0) ? - nbytes : nbytes;
if (incptr == 0)
@@ -369,7 +368,7 @@
the_data,(nbytes < 0) ? - nbytes : nbytes);
*/
-try_one_crash()
+void try_one_crash()
{if (nbytes > 0)
(*badboy)();
else if (nbytes == 0)
@@ -377,7 +376,7 @@
char *subprocess_ind = "subprocess";
-main(argc,argv)
+int main(argc,argv)
int argc; char **argv;
{long nsubs,hrs,mns,scs,tflag,j,m;
note_buffer = (char *) malloc(512);
@@ -411,21 +410,23 @@
note(1);
record_note();
if (strchr(argv[4],':'))
- {sscanf(argv[4],"%d:%d:%d",&hrs,&mns,&scs);
+ {sscanf(argv[4],"%ld:%ld:%ld",&hrs,&mns,&scs);
tflag = 1;
nsubs = (((hrs * 60) + mns) * 60) + scs;
- sprintf(notes,"Subprocess run for %d seconds (%d %02d:%02d:%02d)",
+ sprintf(notes,"Subprocess run for %ld seconds (%ld %02ld:%02ld:%02ld)",
nsubs, hrs / 24, hrs % 24,mns,scs);}
else
{tflag = 0;
nsubs = atol(argv[4]);
- sprintf(notes,"Creating %d crashme subprocesses",nsubs);}
+ sprintf(notes,"Creating %ld crashme subprocesses",nsubs);}
note(1);
vfork_main(tflag,nsubs,argv[0],argv[1],atol(argv[2]),argv[3]);}
else
{sprintf(notes,
"crashme [+]<nbytes>[.inc] <srand> <ntrys> [nsub] [verbose]");
- note(0);}}
+ note(0);}
+ return 0;
+}
void copyright_note(n)
long n;
@@ -440,19 +441,19 @@
{char *ptr;
copyright_note(3);
nbytes = atol(argv[1]);
- if (ptr = strchr(argv[1],'.'))
+ if ((ptr = strchr(argv[1],'.')))
incptr = atol(&ptr[1]);
if (argv[1][0] == '+') malloc_flag = 1;
nseed = atol(argv[2]);
ntrys = atol(argv[3]);
- sprintf(notes,"crashme %s%ld.%d %ld %ld",
+ sprintf(notes,"crashme %s%ld.%ld %ld %ld",
(malloc_flag == 0) ? "" : "+",nbytes,incptr,nseed,ntrys);
note(3);
record_note();
if (malloc_flag == 0)
{the_data = bad_malloc((nbytes < 0) ? -nbytes : nbytes);
badboy = castaway(the_data);
- sprintf(notes,"Badboy at %d. 0x%X",badboy,badboy);
+ sprintf(notes,"Badboy at %d. 0x%X",(int) badboy,(unsigned int) badboy);
note(3);}
srand(nseed);
#ifdef WIN32
@@ -481,9 +482,9 @@
for(i=0;i<ntrys;++i)
{compute_badboy();
if (offset)
- sprintf(notes,"try %d, offset %d",i,offset);
+ sprintf(notes,"try %d, offset %ld",i,offset);
else if (malloc_flag == 1)
- sprintf(notes,"try %d, Badboy at %d. 0x%X",i,badboy,badboy);
+ sprintf(notes,"try %d, Badboy at %d. 0x%X",i,(int) badboy,(unsigned int) badboy);
else
sprintf(notes,"try %d",i);
note(5);
@@ -514,7 +515,7 @@
struct status_list *slist = NULL;
-record_status(n)
+int record_status(n)
long n;
{struct status_list *l;
for(l=slist;l != NULL; l = l->next)
@@ -527,13 +528,13 @@
slist = l;
return(1);}
-summarize_status()
+void summarize_status()
{struct status_list *l;
sprintf(notes,"exit status ... number of cases");
note(2);
for(l=slist;l != NULL; l = l->next)
{sprintf(notes,"exit status ... number of cases");
- sprintf(notes,"%11d ... %5d",l->status,l->count);
+ sprintf(notes,"%11ld ... %5ld",l->status,l->count);
note(2);}}
#ifndef WIN32
@@ -552,7 +553,7 @@
if (monitor_active)
{++monitor_count;
if (monitor_count >= monitor_limit)
- {sprintf(notes,"time limit reached on pid %d 0x%X. using kill.",
+ {sprintf(notes,"time limit reached on pid %ld 0x%lX. using kill.",
monitor_pid,monitor_pid);
note(3);
status = kill(monitor_pid,SIGKILL);
@@ -581,24 +582,24 @@
{my_signal(SIGALRM,monitor_fcn);
alarm(monitor_period);}
time(&before_time);
- sprintf(arg5,"%d",verbose_level);
+ sprintf(arg5,"%ld",verbose_level);
for(j=0;j<n;++j)
- {sprintf(arg2,"%d",sr+j);
- sprintf(arg4,"%d",j+1);
+ {sprintf(arg2,"%ld",sr+j);
+ sprintf(arg4,"%ld",j+1);
#ifdef VMS
status = vfork();
#else
status = fork();
#endif
if (status == 0)
- {status = execl(cmd,cmd,nb,arg2,nt,arg4,arg5,subprocess_ind,0);
+ {status = execlp(cmd,cmd,nb,arg2,nt,arg4,arg5,subprocess_ind,NULL);
if (status == -1)
{perror(cmd);
exit(1);}}
else if (status < 0)
perror(cmd);
else
- {sprintf(notes,"pid = %d 0x%X (subprocess %d)",status,status,j+1);
+ {sprintf(notes,"pid = %d 0x%X (subprocess %ld)",status,status,j+1);
note(3);
if (seq == 1)
{monitor_pid = status;
@@ -606,19 +607,19 @@
monitor_active = 1;
while((pid = wait(&status)) > 0)
{monitor_active = 0;
- sprintf(notes,"pid %d 0x%X exited with status %d",pid,pid,status);
+ sprintf(notes,"pid %ld 0x%lX exited with status %d",pid,pid,status);
note(3);
record_status(status);}}
if (tflag == 1)
{time(&after_time);
total_time = after_time - before_time;
if (total_time >= nsubs)
- {sprintf(notes,"Time limit reached after run %d",j+1);
+ {sprintf(notes,"Time limit reached after run %ld",j+1);
note(2);
break;}}}}
if (seq == 0)
while((pid = wait(&status)) > 0)
- {sprintf(notes,"pid %d 0x%X exited with status %d",pid,pid,status);
+ {sprintf(notes,"pid %ld 0x%lX exited with status %d",pid,pid,status);
note(3);
record_status(status);}
time(&after_time);
@@ -632,7 +633,7 @@
hrs = hrs % 24;
open_record();
sprintf(notes,
- "Test complete, total real time: %d seconds (%d %02d:%02d:%02d)",
+ "Test complete, total real time: %ld seconds (%ld %02ld:%02ld:%02ld)",
total_time,dys,hrs,mns,scs);
note(1);
summarize_status();