Module: wine
Branch: master
Commit: 4f68f67cb5d6c88a062220044f15b9cce8b2c418
URL: https://gitlab.winehq.org/wine/wine/-/commit/4f68f67cb5d6c88a062220044f15b9…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Tue May 14 09:46:58 2024 +0200
configure: Restore warning for missing PE compiler.
It was dropped in cda2886fd3018c9e8c12791238db481b528f6a65.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56665
---
configure | 11 +++++++++++
configure.ac | 3 +++
2 files changed, 14 insertions(+)
diff --git a/configure b/configure
index 0468aea1422..2d1564bfea8 100755
--- a/configure
+++ b/configure
@@ -12027,6 +12027,17 @@ case $HOST_ARCH in
arm|aarch64)
test "x$PE_ARCHS" != x || as_fn_error $? "PE cross-compilation is required for $HOST_ARCH, please install clang/llvm-dlltool/lld, or llvm-mingw." "$LINENO" 5
DLLEXT="" ;;
+ *)
+ if test "x$PE_ARCHS" = "x"
+then :
+ case "x$with_mingw" in
+ x) as_fn_append wine_notices "|Suitable PE cross-compiler not found, PE files won't be built." ;;
+ xno) ;;
+ *) as_fn_error $? "Suitable PE cross-compiler not found, PE files won't be built.
+This is an error since --with-mingw was requested." "$LINENO" 5 ;;
+esac
+
+fi ;;
esac
diff --git a/configure.ac b/configure.ac
index 31c2fa2588e..71398ef9b29 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1016,6 +1016,9 @@ case $HOST_ARCH in
arm|aarch64)
test "x$PE_ARCHS" != x || AC_MSG_ERROR([PE cross-compilation is required for $HOST_ARCH, please install clang/llvm-dlltool/lld, or llvm-mingw.])
DLLEXT="" ;;
+ *)
+ WINE_NOTICE_WITH(mingw,[test "x$PE_ARCHS" = "x"],
+ [Suitable PE cross-compiler not found, PE files won't be built.]) ;;
esac
dnl **** External libraries ****
Module: vkd3d
Branch: master
Commit: 5b7191280b7709d51b585c4f517e7ede763e01b5
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/5b7191280b7709d51b585c4f517e7…
Author: Francisco Casas <fcasas(a)codeweavers.com>
Date: Mon May 6 16:51:36 2024 -0400
vkd3d-shader: Return a valid pointer when count=0 in param allocator (ubsan).
After compiling and linking with '-fsanitize=undefined' the following
error pops up in many tests:
vkd3d_shader_main.c:2024:12: runtime error: member access within null pointer of type 'struct vkd3d_shader_param_node'
This happens in the scenario where shader_param_allocator_get() gets
called with 'count = 0' but no allocation has been made yet, so
allocator->current is NULL.
In this case the result of the function, given by:
params = &allocator->current->param[allocator->index * allocator->stride];
is an invalid non-NULL pointer.
Functions like shader_sm4_read_instruction() may call
vsir_program_get_src_params() or vsir_program_get_dst_params() with 0
counts for various DCL_ instructions, as well as things like NOP,
ELSE, and SYNC.
We could avoid calling the functions in question with 0 counts, but it
doesn't seem worth the effort.
Alternatively, we could just return NULL on 'count == 0', but this is
also complicated because NULL is interpreted as a memory allocation
failure on the callers.
So we force allocation of the next node even if 'count = 0' when
allocator->current is NULL.
---
libs/vkd3d-shader/vkd3d_shader_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c
index a7b42217..18456480 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -2004,7 +2004,7 @@ void *shader_param_allocator_get(struct vkd3d_shader_param_allocator *allocator,
{
void *params;
- if (count > allocator->count - allocator->index)
+ if (!allocator->current || count > allocator->count - allocator->index)
{
struct vkd3d_shader_param_node *next;