*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@1043 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2e9590e9ef
commit
a62a269464
2 changed files with 70 additions and 5 deletions
|
|
@ -12,6 +12,8 @@
|
|||
typedef double Real;
|
||||
typedef Real Float;
|
||||
|
||||
char buffer[256];
|
||||
|
||||
/* A simple segmentation fault on an uninitialized pointer */
|
||||
int seg_crash() {
|
||||
int *a = 0;
|
||||
|
|
@ -40,12 +42,10 @@ int overflow_crash() {
|
|||
}
|
||||
}
|
||||
|
||||
/* A simple bus error. This might fail silently on certain platforms */
|
||||
/* A simple bus error. */
|
||||
int bus_crash() {
|
||||
int b;
|
||||
int *a = &b;
|
||||
a = (int *) ((int) a | 0x1);
|
||||
*a = 3;
|
||||
double *a = (double *) (buffer+1);
|
||||
*a = 3.4;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue