1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import unittest
import cwe_checker_testlib
class TestCwe248(unittest.TestCase):
def setUp(self):
self.target = '248'
self.string = b'Possibly Uncaught Exception'
def test_cwe248_01_x64_gcc(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'x64', 'g++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip("FIXME")
def test_cwe248_01_x64_clang(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'x64', 'clang++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip("Fix CPP compilation issue for x86")
def test_cwe248_01_x86_gcc(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'x86', 'g++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip("FIXME")
def test_cwe248_01_x86_clang(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'x86', 'clang++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip("FIXME")
def test_cwe248_01_arm_gcc(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'arm', 'g++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip('Not supported by BAP. (no recognizable code backtrace)')
def test_cwe248_01_aarch64_gcc(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'aarch64', 'g++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip("Depends on proper MIPS support in BAP")
def test_cwe248_01_mips_gcc(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'mips', 'g++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip("FIXME")
def test_cwe248_01_mipsel_gcc(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'mipsel', 'g++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip("FIXME")
def test_cwe248_01_mips64_gcc(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'mips64', 'g++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip("FIXME")
def test_cwe248_01_mips64el_gcc(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'mips64el', 'g++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip("FIXME")
def test_cwe248_01_ppc_gcc(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'ppc', 'g++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip('Not supported by BAP. (no recognizable code backtrace)')
def test_cwe248_01_ppc64_gcc(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'ppc64', 'g++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip("FIXME")
def test_cwe248_01_ppc64le_gcc(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'ppc64le', 'g++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip("FIXME")
def test_cwe248_01_x86_mingw_gcc(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'x86', 'mingw32-g++', self.string)
self.assertEqual(res, expect_res)
@unittest.skip('FIXME!')
def test_cwe248_01_x64_mingw_gcc(self):
expect_res = 2
res = cwe_checker_testlib.execute_and_check_occurence(
self.target, self.target, 'x64', 'mingw32-g++', self.string)
self.assertEqual(res, expect_res)