Hi, > > However edk2 has other problems revealed probably by GCC 12, see: > > https://kojipkgs.fedoraproject.org//work/tasks/4195/81484195/build.log > > A valid warning, perhaps slightly overzealous depending on how Error is defined: > > GenSec.c:1065:5: error: pointer used after 'fclose' [-Werror=use-after-free] > 1065 | Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > GenSec.c:1064:5: note: call to 'fclose' here > 1064 | fclose (InFileHandle); > | ^~~~~~~~~~~~~~~~~~~~~ > > But it seems more likely that the bug is real. Maybe that %s should be %p, > or the function call is bogus in some other way. Yep, it is. > > openbios has a segfault somewhere during the FORTH bootstrap: > > https://kojipkgs.fedoraproject.org//work/tasks/6090/81556090/build.log > > I was not able to reproduce this one locally. > > I would try reproducing with -O0 first. It might be a dup of the QEMU bug > https://gcc.gnu.org/PR104067, even. It's a problem with loop optimizations, > so it could be the kind of thing that can wreak havoc on a FORTH interpreter! > Once the fix for PR104067 hits Fedora, if it's not fixed I can take a look. A few errors later I get that one: In function ‘SetDevicePathEndNode’, inlined from ‘FileDevicePath’ at DevicePathUtilities.c:857:5: DevicePathUtilities.c:321:3: error: writing 4 bytes into a region of size 1 [-Werror=stringop-overflow=] 321 | memcpy (Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevicePathLibEndDevicePath)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from UefiDevicePathLib.h:22, from DevicePathUtilities.c:16: ../Include/Protocol/DevicePath.h: In function ‘FileDevicePath’: ../Include/Protocol/DevicePath.h:51:9: note: destination object ‘Type’ of size 1 51 | UINT8 Type; ///< 0x01 Hardware Device Path. | ^~~~ cc1: all warnings being treated as errors Hmm, mUefiDevicePathLibEndDevicePath is a 4-byte struct with 1-byte "Type" being the first struct field. Node is a void ptr. So the code looks perfectly fine to me. Did I miss something, or is that another case of a gcc bug? take care, Gerd _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure