Date: Tue, 21 Sep 2021 21:17:12 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: c2ee4dfd0497 - main - ia32_get_fpcontext(): xfpusave can be legitimately NULL Message-ID: <202109212117.18LLHCVp041358@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c2ee4dfd04970f1597eea58bb30eb93e1ed5a491 commit c2ee4dfd04970f1597eea58bb30eb93e1ed5a491 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-09-21 21:09:34 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-09-21 21:17:06 +0000 ia32_get_fpcontext(): xfpusave can be legitimately NULL Reported by: cy Sponsored by: The FreeBSD Foundation MFC after: 1 week Fixes: bd9e0f5df681da8b5ef05 --- sys/amd64/ia32/ia32_signal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/amd64/ia32/ia32_signal.c b/sys/amd64/ia32/ia32_signal.c index 1ca19072a1dc..ab7100f5b9fb 100644 --- a/sys/amd64/ia32/ia32_signal.c +++ b/sys/amd64/ia32/ia32_signal.c @@ -99,6 +99,8 @@ ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp, bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate[0], sizeof(mcp->mc_fpstate)); mcp->mc_fpformat = fpuformat(); + if (xfpusave == NULL) + return; if (!use_xsave || cpu_max_ext_state_size <= sizeof(struct savefpu)) { *xfpusave_len = 0; *xfpusave = NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109212117.18LLHCVp041358>