git: 38c74c46b220 - stable/14 - amd64: initialize td_frame stack area for init(8) main thread

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Tue, 02 Apr 2024 08:59:41 UTC
The branch stable/14 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=38c74c46b220d8f74335026c4dcca0ab368789d2

commit 38c74c46b220d8f74335026c4dcca0ab368789d2
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-03-25 12:10:43 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-04-02 08:58:20 +0000

    amd64: initialize td_frame stack area for init(8) main thread
    
    (cherry picked from commit e0c92dd2b7e62e4f8281c9ad1d31465bb32f9e3b)
---
 sys/kern/init_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index a8df9f84a29a..8d650c7ea084 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -787,6 +787,7 @@ start_init(void *dummy)
 		 */
 		KASSERT((td->td_pflags & TDP_EXECVMSPC) == 0,
 		    ("nested execve"));
+		memset(td->td_frame, 0, sizeof(*td->td_frame));
 		oldvmspace = p->p_vmspace;
 		error = kern_execve(td, &args, NULL, oldvmspace);
 		KASSERT(error != 0,