re sanerb / 2014-02-19 19:29
The error message captured in this comment seems impossible, hence something
probably happens with undefined behavior. If you're still suspicious of the
earlier memcpy() thing (overlapping regions etc), here's a debug patch, but
it doesn't fire on my end. Don't forget to rebuild VfrCompile with make -C
"$EDK_TOOLS_PATH".
From 4680e08ee2fbb88bb37e4ab8d946ec28acce2b2f Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Mon, 17 Mar 2014 19:14:46 +0100
Subject: [PATCH] VfrCompile: debug overlapping memcpy()s
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
BaseTools/Source/C/VfrCompile/GNUmakefile | 2 +-
BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | 34 +++++++++++++++++++++++++
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/BaseTools/Source/C/VfrCompile/GNUmakefile b/BaseTools/Source/C/VfrCompile/GNUmakefile
index 82005e1..0d679a7 100644
--- a/BaseTools/Source/C/VfrCompile/GNUmakefile
+++ b/BaseTools/Source/C/VfrCompile/GNUmakefile
@@ -24,7 +24,7 @@ TOOL_INCLUDE = -I Pccts/h
OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyntax.o \
VfrFormPkg.o VfrError.o VfrUtilityLib.o VfrCompiler.o
-VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS)
+VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS) -g3
LINKER = $(CXX)
diff --git a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
index 7c1383e..8d80d9b 100644
--- a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
@@ -18,6 +18,40 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "VfrUtilityLib.h"
#include "VfrFormPkg.h"
+#include <string.h>
+#include <stdint.h>
+#include <assert.h>
+#include <execinfo.h>
+#include <unistd.h>
+
+#define NFRAMES 32
+
+void *
+memcpy(void *dest, const void *src, size_t n)
+{
+ uintptr_t s, d;
+
+ s = (uintptr_t)src;
+ d = (uintptr_t)dest;
+ assert(n <= (uintptr_t)-1);
+ assert(s <= (uintptr_t)-1 - n);
+ assert(d <= (uintptr_t)-1 - n);
+
+ if (s + n > d && d + n > s) {
+ void *frames[NFRAMES];
+ int nframes;
+
+ nframes = backtrace(frames, NFRAMES);
+ assert(nframes > 0);
+ assert(nframes < NFRAMES);
+
+ fprintf(stderr, "memcpy(%p, %p, 0x%zx) overlap:\n", dest, src, n);
+ backtrace_symbols_fd(frames, nframes, STDERR_FILENO);
+ }
+
+ return memmove(dest, src, n);
+}
+
VOID
CVfrBinaryOutput::WriteLine (
IN FILE *pFile,
--
1.8.3.1
Search Criteria
Package Details: edk2-shell-git r34315.93aeaa0812-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/edk2-git.git (read-only, click to copy) |
---|---|
Package Base: | edk2-git |
Description: | EDK2 UEFI Shell |
Upstream URL: | https://github.com/tianocore/edk2 |
Licenses: | BSD |
Provides: | uefi-shell |
Submitter: | markzz |
Maintainer: | None |
Last Packager: | C0rn3j |
Votes: | 31 |
Popularity: | 0.000000 |
First Submitted: | 2022-01-12 20:51 (UTC) |
Last Updated: | 2025-05-26 09:50 (UTC) |
Dependencies (8)
- aarch64-linux-gnu-gcc (make)
- acpica (make)
- git (git-gitAUR, git-glAUR) (make)
- iasl (acpica) (make)
- nasm (nasm-gitAUR) (make)
- python (python37AUR) (make)
- seabios (make)
- util-linux-libs (util-linux-libs-aesAUR, util-linux-libs-selinuxAUR) (make)
Required by (0)
Sources (18)
- 50-edk2-ovmf-git-i386-secure.json
- 50-edk2-ovmf-git-x86_64-secure.json
- 60-edk2-armvirt-git-aarch64.json
- 60-edk2-ovmf-git-i386.json
- 60-edk2-ovmf-git-x86_64.json
- 70-edk2-ovmf-git-i386-csm.json
- 70-edk2-ovmf-git-x86_64-csm.json
- 80-edk2-ovmf-git-ia32-on-x86_64-secure.json
- 81-edk2-ovmf-git-ia32-on-x86_64.json
- 82-edk2-ovmf-git-ia32-on-x86_64-csm.json
- brotli-1.1.0.tar.gz
- edk2
- https://www.openssl.org/source/openssl-3.5.0.tar.gz
- https://www.openssl.org/source/openssl-3.5.0.tar.gz.asc
- libfdt
- libspdm
- mbedtls
- public-mipi-sys-t
Latest Comments
« First ‹ Previous 1 .. 7 8 9 10 11 12 13 Next › Last »
lersek_RH commented on 2014-03-17 18:33 (UTC)
sanerb commented on 2014-02-23 05:05 (UTC)
haven't tried it yet, but worth a look: https://aur.archlinux.org/packages/freeswitch-git/ comment:
The mod_v8 python build error can be mitigated by creating a custom /usr/local/bin/python file as detailed in the Arch wiki https://wiki.archlinux.org/index.php/Python#Dealing_with_version_problem_in_build_scripts
Modify this line
case "$script" in (/path/to/project1/*|/path/to/project2/*|/path/to/project3*)
So it looks something like this
case "$script" in (/tmp/*|/home/username/Downloads/freeswitch-git/*)
The first path (/tmp/*) to is to make it work with AUR utils such as packer-color. The second path would be to change the active version of python if you wanted to build freeswitch-git using makepkg at path /home/username/Downloads/freeswitch-git/*
since it seems to be build.py that's failing, perhaps this is a python2 vs python3 thing.
sanerb commented on 2014-02-19 19:29 (UTC)
this error continues to occur even with a fresh building dir and source fetch:
"VfrCompile" -l -n --string-db /var/abs/local/yaourtbuild/ovmf-svn/src/tianocore-edk2-svn_build/Build/OvmfX64/RELEASE_GCC48/X64/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe/OUTPUT/BdsDxeStrDefs.hpk --output-directory /var/abs/local/yaourtbuild/ovmf-svn/src/tianocore-edk2-svn_build/Build/OvmfX64/RELEASE_GCC48/X64/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/DeviceMngr /var/abs/local/yaourtbuild/ovmf-svn/src/tianocore-edk2-svn_build/Build/OvmfX64/RELEASE_GCC48/X64/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe/OUTPUT/DeviceManagerVfr.i
VfrCompile: ERROR 0003: Error parsing
compile error in file (null)
make: *** [/var/abs/local/yaourtbuild/ovmf-svn/src/tianocore-edk2-svn_build/Build/OvmfX64/RELEASE_GCC48/X64/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/DeviceMngr/DeviceManagerVfr.c] Error 2
GNUmakefile:920: recipe for target '/var/abs/local/yaourtbuild/ovmf-svn/src/tianocore-edk2-svn_build/Build/OvmfX64/RELEASE_GCC48/X64/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/DeviceMngr/DeviceManagerVfr.c' failed
build.py...
: error 7000: Failed to execute command
make tbuild [/var/abs/local/yaourtbuild/ovmf-svn/src/tianocore-edk2-svn_build/Build/OvmfX64/RELEASE_GCC48/X64/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe]
build.py...
: error F002: Failed to build module
/var/abs/local/yaourtbuild/ovmf-svn/src/tianocore-edk2-svn_build/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf [X64, GCC48, RELEASE]
- Failed -
Build end time: 14:21:38, Feb.19 2014
Build total time: 00:01:33
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Makepkg was unable to build ovmf-svn.
==> Restart building ovmf-svn ? [y/N]
==> ---------------------------------
==>
i suspect it may be due to upstream as it seems a similar issue happened with a (very much so) earlier version in the same file (DeviceManagerVfr.c):
http://feishare.com/efimail/messages/20081205-2046-Re__Edk2_Dev__Trouble_building_the_TOT_tools-_Andrew_J__Fish_.html
their bug tracker (via trac) is here:
http://sourceforge.net/apps/trac/edk2/report/1?asc=0&sort=created&USER=anonymous
i haven't submitted a report, however, as i'm not entirely sure what's going on with this failure. i'd encourage someone a bit more familiar with EDKII to submit one though.
hugg commented on 2014-02-11 04:05 (UTC)
I couldn't get this to build using yaourt or with makepkg.
"VfrCompile" -l -n --string-db /var/abs/local/yaourt-tmp/yaourt-tmp-hugg/aur-ovmf-svn/src/tianocore-edk2-svn_build/Build/OvmfX64/RELEASE_GCC48/X64/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe/OUTPUT/BdsDxeStrDefs.hpk --output-directory /var/abs/local/yaourt-tmp/yaourt-tmp-hugg/aur-ovmf-svn/src/tianocore-edk2-svn_build/Build/OvmfX64/RELEASE_GCC48/X64/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/DeviceMngr /var/abs/local/yaourt-tmp/yaourt-tmp-hugg/aur-ovmf-svn/src/tianocore-edk2-svn_build/Build/OvmfX64/RELEASE_GCC48/X64/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe/OUTPUT/DeviceManagerVfr.i
VfrCompile: ERROR 0003: Error parsing
compile error in file (null)
make: *** [/var/abs/local/yaourt-tmp/yaourt-tmp-hugg/aur-ovmf-svn/src/tianocore-edk2-svn_build/Build/OvmfX64/RELEASE_GCC48/X64/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/DeviceMngr/DeviceManagerVfr.c] Error 2
GNUmakefile:920: recipe for target '/var/abs/local/yaourt-tmp/yaourt-tmp-hugg/aur-ovmf-svn/src/tianocore-edk2-svn_build/Build/OvmfX64/RELEASE_GCC48/X64/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/DeviceMngr/DeviceManagerVfr.c' failed
build.py...
: error 7000: Failed to execute command
make tbuild [/var/abs/local/yaourt-tmp/yaourt-tmp-hugg/aur-ovmf-svn/src/tianocore-edk2-svn_build/Build/OvmfX64/RELEASE_GCC48/X64/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe]
build.py...
: error F002: Failed to build module
/var/abs/local/yaourt-tmp/yaourt-tmp-hugg/aur-ovmf-svn/src/tianocore-edk2-svn_build/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf [X64, GCC48, RELEASE]
- Failed -
Build end time: 22:58:42, Feb.10 2014
Build total time: 00:01:58
==> ERROR: A failure occurred in build().
Aborting...
FAIL: 2
ka2107 commented on 2013-08-25 07:25 (UTC)
@mazieres: There have been a few changes in UEFI Shell and OVMF recently. The help "-" issue and "map" command issues might be due to the changes. I suggest contacting tianocore devs in edk2-devel ML.
FredBezies commented on 2013-08-25 07:01 (UTC)
Crashing on start with qemu 1.6 and qemu-git :
qemu-system-x86_64 -enable-kvm -net none -m 1024 -bios /usr/share/ovmf/x86_64/bios.bin
KVM internal error. Suberror: 1
emulation failure
EAX=c0000033 EBX=fffe60e4 ECX=c0000080 EDX=00000000
ESI=fffe62c4 EDI=00005042 EBP=fffe6000 ESP=00000000
EIP=ffffff26 EFL=00000082 [--S----] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA]
CS =0010 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA]
SS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA]
DS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA]
FS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA]
GS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA]
LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT
TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS64-busy
GDT= 00000000ffffff80 0000001f
IDT= 0000000000000000 0000ffff
CR0=c0000033 CR2=0000000000000000 CR3=00000000ffffe000 CR4=00000660
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000500
Code=00 c0 0f 32 0f ba e8 08 0f 30 0f 20 c0 0f ba e8 1f 0f 22 c0 <ea> 2d ff ff ff 18 00 e9 93 00 00 00 fa bb 00 f0 8e db bb 6c ff 2e 66 0f 01 17 66 b8 23 00
mazieres commented on 2013-08-18 18:57 (UTC)
For some reason, the help summary in the efi shell does not work with this package. If I used ovmf-bin, it works fine. But if I boot this version and get into the efi shell, typing "help" just produces a bunch of blank lines with "-" in the middle. I can still get help on individual topics, just not the list of commands. Very annoying.
I suspect this has something to do with display colors or something falling back to black on black.
I can say "help * -usage -b" so as to see all the commands, but that's a lot less readable than the default help, so I'm having trouble finding the new commands.
In particular, compared to the shell in ovmf-bin, the "map" command does not display all the mappings. For example, I can't figure out how to discover the name of the EFI system partition. With the ovmf-bin shell, the command "map" shows fs0, but such an entry is missing from the output of this shell. I assume there's some other command now, but can't figure out what it is.
ka2107 commented on 2013-07-15 13:50 (UTC)
@wuischke: 'iasl' added to makedepends.
Pinned Comments