https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264021
Jessica Clarke <jrt...@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jrt...@freebsd.org --- Comment #8 from Jessica Clarke <jrt...@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.