-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64a7763
commit 7f3798f
Showing
14 changed files
with
96 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
cat >exit_42.c <<eof | ||
#include <stdlib.h> | ||
int main(void) {exit(42);} | ||
eof | ||
|
||
cat >return_42.c <<eof | ||
int main(void) {return 42;} | ||
eof | ||
|
||
for source in exit_42.c return_42.c | ||
do | ||
$dcc "$source" || | ||
continue | ||
./a.out | ||
exit_status=$? | ||
test "$exit_status" != 42 && | ||
echo "$source incorrect exit status: $exit_status" 1>&2 | ||
done | ||
|
||
rm -f a.out exit_42.c return_42.c |
2 changes: 2 additions & 0 deletions
2
tests/run_time_no_errors/no_leak_empty.c → tests/run_time_no_errors/empty_main.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
//dcc_flags= | ||
//dcc_flags=-fsanitize=address | ||
//dcc_flags=--leak-check | ||
|
||
int main(void) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <stdio.h> | ||
#include <assert.h> | ||
|
||
int main(void) { | ||
assert(fileno(stdin) == 0); | ||
assert(fileno(stdout) == 1); | ||
assert(fileno(stderr) == 2); | ||
assert(fileno(fopen(__FILE__, "r")) == 3); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters