Skip to content

Commit ba9088d

Browse files
committed
Enable glibc memory debugging in CI to catch heap corruption early
Set MALLOC_CHECK_=3 to abort immediately on heap corruption detection without error messages. Values: 0=ignore errors, 1=print diagnostics to stderr, 2=call abort(), 3=abort without diagnostics. Set MALLOC_PERTURB_=170 (0xAA) to fill allocated memory with 0x55 and freed memory with 0xAA, exposing use-after-free and uninitialized memory bugs through deterministic non-zero patterns.
1 parent f63bef0 commit ba9088d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on: [push, pull_request]
44

55
env:
66
CARGO_TERM_COLOR: always
7+
MALLOC_CHECK_: 3 # Abort immediately on heap corruption (0=ignore, 1=print, 2=abort, 3=abort+no messages)
8+
MALLOC_PERTURB_: 170 # Fill allocated memory with 0x55, freed memory with 0xAA to catch use-after-free
79

810
jobs:
911
format:

0 commit comments

Comments
 (0)