Context
Add optional AddressSanitizer (ASan) instrumentation to the GSSAPI enterprise auth tests to detect memory errors in the C code used for Kerberos authentication.
CGO_CFLAGS="-fsanitize=address" CGO_LDFLAGS="-fsanitize=address" MONGODB_URI="mongodb://fakeuser@localhost:27017/admin?authMechanism=GSSAPI" go run -tags gssapi ./internal/cmd/testentauth/main.go
Definition of done
This will require:
- Installing libasan on CI hosts (package names vary by distro: libasan8 on RHEL 8, libasan6/libasan5 on Debian/Ubuntu)
- Setting CGO_CFLAGS="-fsanitize=address" and CGO_LDFLAGS="-fsanitize=address" when running tests
- Skipping ASan on Windows (MinGW lacks support)
- related to
-
GODRIVER-3770 Heap Out-of-Bounds Read in GSSAPI Error Handling
-
- Closed
-