Date: Fri, 20 May 2022 21:04:16 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 264021] efi: failed to allocate staging area: 9 Message-ID: <bug-264021-227-Ckk5tygOee@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-264021-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264021 Jessica Clarke <jrtc27@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jrtc27@freebsd.org --- Comment #8 from Jessica Clarke <jrtc27@freebsd.org> --- I doubt efihdr is the problem. It's likely that the call to BS->GetMemoryMap the first time round the loop, which is guaranteed to be executed, reads an uninitialised mm, and thus we have trivially provably guaranteed UB ("The value of an object with automatic storage duration is used while it is indeterminate"). What value it takes doesn't matter as the first time round the loop we use sz = 0 so, unless the memory map has 0 entries, it's guaranteed to fit, but it must be initialised to something determinate. Minimal-ish reproducer: https://godbolt.org/z/KTvd73osd -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-264021-227-Ckk5tygOee>
