Make sure the pointers we return from our continuous memory buffer is
always 64-bit aligned as it's used not only for strings, but also for
structs/objects, and such unaligned memory access is undefined on some
archs and flagged as such by ASAN.
Change-Id: I84cf74e4e9d203fe02507aa1190ccc6554fb36e2
UBSAN doesn't print stack traces by default. Enable them.
The GLib slice allocator must be disabled for proper leak checks and
must be instructed to always use malloc instead.
Change-Id: Ic4fe5ad38aa4460fbe43858b97226cce7d658038
Avoid accessing memory via pointers that may not be aligned, which is
undefined behaviour on some archs. Use memcpy for this purpose instead.
Change-Id: Iec6c8d15fdd7ef00896e494b69412847b637b01b
Check if the uint64_t pointer is aligned before using it. If unaligned,
go byte by byte. Unaligned pointer access is undefined on some archs and
flagged as such by ASAN.
Change-Id: I3afc80a2ddbc874a62d6930971493f8d461aa452
If the length of the string is zero, the pointer to the buffer may be
null. ASAN flags these as invalid/undefined, so don't do that.
Change-Id: Ic55498465c53a78e1bd44c42d1a60f9bd3336473
To get better backtraces we should build with -ggdb and -O0. And to
avoid gcc's ASAN implementation erroring out due to libasan not being
passed first as part of LD_PRELOAD, we disable the check via
ASAN_OPTIONS.
Change-Id: I6e8c422fef3c8fdcdc20e815292ffca4f6d6becb
We need to pass these on through environment otherwise we are overriding
the whole build flags.
Change-Id: I3fd856af2624f84afe73427dfb359e8bfc3acaa8
Fixes: commit f791bf03f9
The Ubuntu release used does not have the required package, so we need
to disable it via our build-profile.
Change-Id: I7b929bf5b8cfc60a75e72cbd3b92036cb28d4066
Fixes: commit f791bf03f9
Rename the workflow, as this is only in charge of running the shellcheck
tests. Having a workflow per checker also makes them more modular, and
easier to reuse in other projects by simply copying the files around.
And makes it easier to see what checks are currently available from
the filenames.
Rename the job to "test", for correctness, as it has implicit ordering
and meaning within the GitHub action built-in stages.
Change-Id: I3987fc03111d94a8bc64e9103e43cb4d05925e12
Since dh_auto_test doesn't execute the test suites through make
directly, but instead runs `make -s -n` and then executes the output,
the integrated build tests fail since the sub-make doesn't return an
error as it should when attempting to build with the wrong .h
alternative, resulting in always the first .h alternative being used.
Fix this by using a wrapper script instead.
Also adjust some other related minor build details.
closes#1202
Change-Id: I4b6436295c6b39117bd06df53aa5afc7118ad6a1