Commit 85250921 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Paul E. McKenney
Browse files

tools/nolibc: add test for __stack_chk_guard initialization

parent 88fc7eb5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -808,6 +808,14 @@ static int run_protection(int min, int max)
	return 0;
#endif

#if defined(NOLIBC_STACKPROTECTOR)
	if (!__stack_chk_guard) {
		llen += printf("__stack_chk_guard not initialized");
		pad_spc(llen, 64, "[FAIL]\n");
		return 1;
	}
#endif

	pid = -1;
	pid = fork();