Skip to content

Commit ca60e86

Browse files
committed
MUTANT (CI only): red zone and poison checks disabled - the HG_MALLOC_DBG tests must fail
1 parent 3c680d0 commit ca60e86

2 files changed

Lines changed: 9 additions & 57 deletions

File tree

‎.github/workflows/unittests.yml‎

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -43,64 +43,10 @@ jobs:
4343

4444
strategy:
4545
fail-fast: false
46+
# MUTANT branch (CI only): one native job is enough to show the tests fail
4647
matrix:
47-
os: [20.04, 22.04, 24.04, 26.04]
48-
compiler: ['gcc', 'clang']
49-
include:
50-
- os: 20.04
51-
compiler: 'gcc-9'
52-
- os: 20.04
53-
compiler: 'gcc-10'
54-
- os: 20.04
55-
compiler: 'clang-9'
56-
- os: 20.04
57-
compiler: 'clang-10'
58-
- os: 24.04
59-
compiler: 'gcc'
60-
- os: 24.04
61-
compiler: 'clang'
62-
- os: 24.04
63-
compiler: 'gcc-13'
64-
- os: 24.04
65-
compiler: 'gcc-14'
66-
- os: 24.04
67-
compiler: 'clang-16'
68-
- os: 24.04
69-
compiler: 'clang-17'
70-
- os: 24.04
71-
compiler: 'clang-18'
72-
- os: 24.04
73-
compiler: 'clang-19'
74-
- os: 22.04
75-
compiler: 'gcc-11'
76-
- os: 22.04
77-
compiler: 'gcc-12'
78-
- os: 22.04
79-
compiler: 'clang-11'
80-
- os: 22.04
81-
compiler: 'clang-12'
82-
- os: 22.04
83-
compiler: 'clang-13'
84-
- os: 22.04
85-
compiler: 'clang-14'
86-
- os: 22.04
87-
compiler: 'clang-15'
88-
- os: 22.04
89-
compiler: 'gcc-arm64-qemu-cross'
90-
- os: 22.04
91-
compiler: 'gcc-arm32-qemu-cross'
92-
- os: 22.04
93-
compiler: 'clang-arm64-qemu-cross'
94-
- os: 22.04
95-
compiler: 'clang-arm32-qemu-cross'
96-
- os: 26.04
97-
compiler: 'gcc-14'
98-
- os: 26.04
99-
compiler: 'clang-18'
100-
- os: 26.04
101-
compiler: 'clang-19'
102-
- os: 26.04
103-
compiler: 'clang-20'
48+
os: [24.04]
49+
compiler: ['gcc']
10450

10551
# Steps represent a sequence of tasks that will be executed as part of the job
10652
steps:

‎mem/hg_dbg.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ int hg_dbg_tail_check(struct hg_block *hb, void *cs, unsigned long cap)
7777
unsigned long enc, size, i;
7878
char what[64];
7979

80+
if (cap) /* MUTANT: the red zone is never checked */
81+
return 0;
82+
8083
memcpy(&enc, pay + cap - HG_DBG_TAIL, HG_DBG_TAIL);
8184
size = enc ^ tail_key(cs);
8285
if (size <= cap - HG_DBG_TAIL) {
@@ -128,6 +131,9 @@ static int quar_check(struct hg_block *hb, char *cs, unsigned int c)
128131
const unsigned char *pay = (const unsigned char *)cs + HG_CELL_HDR;
129132
unsigned long cap = hg_cell_total_size(c) - HG_CELL_HDR, i;
130133

134+
if (cap) /* MUTANT: the poison is never checked */
135+
return 0;
136+
131137
if (hg_hdr_state(cs) != HG_ST_FREE || HG_CELL_AT(cs)->cls != c) {
132138
hg_corrupt(hb, HG_C_HEADER);
133139
LM_CRIT("%s: the header of %p was overwritten while the cell sat "

0 commit comments

Comments
 (0)