Skip to content

Commit 68fcde3

Browse files
committed
MUTANT (CI only): realloc copies half the shared prefix - the fuzz test must fail
1 parent 0687903 commit 68fcde3

2 files changed

Lines changed: 4 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_malloc_dyn.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ void *hg_realloc(struct hg_block *hb, void *p, unsigned long size,
232232
if (own)
233233
hg_san_open(own, HG_HDR(p), cur_payload);
234234
}
235+
copy /= 2; /* MUTANT: realloc keeps half the shared prefix */
235236
memcpy(ptr, p, copy);
236237
#if !defined INLINE_ALLOC && defined DBG_MALLOC
237238
hg_free_dbg(hb, p, file, func, line);

0 commit comments

Comments
 (0)