valgrind/tests/quick-valgrind-sanity/unitialized.c
Alexandra Hájková b410fdab03 enable CI gating
gating.yaml only use tier0.functional, not scratch-build.validation.

The scratch-build.validation is for rebuilding the kernel, we don't
really need that as gating rule, since valgrind isn't part of the
kernel build chain.

plans/ci.fmf: Use tmt, not beakerlib, for how.

beakerlib is deprecated.

tests/quick-valgrind-sanity/main.fmf recommend only valgrind[-devel], gcc and make

This test doesn't use c++, fortran or 32bit glibc-devel.
2021-04-17 01:38:10 +02:00

31 lines
437 B
C

/* valgrind ./a.out 0 ~> no error */
/* valgrind ./a.out 1 ~> error */
#include <stdlib.h>
struct something {
char c;
int x;
};
/* === 8 bytes ===
* 42
* garbage
* garbage
* garbage
* 42
* 42
* 42
* 42
*/
int main(int argc, char *argv[])
{
struct something st = { 0x2A, 0x2A2A2A2A };
struct something st_copy = st;
return (int) *(&(st_copy.c)+atoi(argv[1]));
}
/* error generated after main returns */