valkey/.github
Madelyn Olson 1b3199e070
Fix unit test issues on address sanitizer and fortify (#437)
This commit does four things:

1. On various images, the linker was not able to correctly load the flto
optimizations from the archive generated for unit tests, and was
throwing errors. I was able to solve this by updating the plugin for the
fortify test, but was unable to reproduce it on the ASAN tests or find a
solution. So I decided to go with a single solution for now, which was
to just disable the linker optimizations for those tests. This shouldn't
weaken the protections provided by ASAN.
2. The change to remove flto for some reason caused some odd inlining
behavior in the intset test, that I wasn't really able to understand.
The error was basically that we were doing a 4 byte write, starting at
byte offset 8, for the first addition to listpack that was of size 10.
Practically this has no effect, since I'm not aware of any allocator
that would give us a 10 byte block as opposed to 12 (or more likely 16)
bytes. The isn't the correct behavior, since an uninitialized listpack
defaults to 16bit encoding, which should only be writing 2 bytes. I
rabbit holed like 2 hours into this, and gave up and just ignored the
warning on the file.
3. Now that address sanitizer was correctly running, it picked up two
issues. A memory leak and uninitialized value, so those were easy to
fix.
4. There is also a small change to the fortify to build the test up
front instead of later, this is just to be consistent with other tests
and has no functional change.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-05-05 22:00:08 -07:00
..
actions/generate-package-build-matrix Adds workflows to build release binaries and push to S3 (#315) 2024-04-16 07:01:36 -07:00
ISSUE_TEMPLATE Update CONTRIBUTING.md and issue templates (#311) 2024-04-15 16:00:59 +02:00
workflows Fix unit test issues on address sanitizer and fortify (#437) 2024-05-05 22:00:08 -07:00
dependabot.yml Fix typos and replace 'codespell' with 'typos' (#72) 2024-03-31 12:38:22 -07:00