Module: vkd3d
Branch: master
Commit: f525e9e93a991480fce9a54cdfb1c780d5d44639
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/f525e9e93a991480fce9a54cdfb1c…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com>
Date: Thu Aug 31 22:37:53 2023 +0200
ci: Run the tests on a 32 bit Linux system.
---
gitlab/README | 8 ++++----
gitlab/build.yml | 19 +++++++++++++++++--
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/gitlab/README b/gitlab/README
index b04a3c8f..ef4d0bed 100644
--- a/gitlab/README
+++ b/gitlab/README
@@ -11,10 +11,10 @@ testing, and uploads it to the GitLab container registry. The Docker
script is in the file image.docker.
The file build.yml contains the actual testing targets. Currently
-vkd3d is tested on Linux x86-64, with two different Vulkan drivers
-(both from Mesa): llvmpipe (a software implementation) and RADV (a
-hardware implementation backed by an AMD GPU). The testing logs are
-available as CI artifacts.
+vkd3d is tested on Linux, on x86-64 and i386, each architecture with
+two different Vulkan drivers (both from Mesa): llvmpipe (a software
+implementation) and RADV (a hardware implementation backed by an AMD
+GPU). The testing logs are available as CI artifacts.
Some custom runner configuration is required in order to run the tests
on an AMD GPU. Specifically, a runner tagged with `amd-gpu' must be
diff --git a/gitlab/build.yml b/gitlab/build.yml
index c10d64a6..780d645b 100644
--- a/gitlab/build.yml
+++ b/gitlab/build.yml
@@ -25,15 +25,30 @@
paths:
- artifacts
-build-radv:
+build-radv-64:
extends: .build
tags:
- amd-gpu
variables:
VK_LOADER_DRIVERS_SELECT: 'radeon_*'
-build-llvmpipe:
+build-llvmpipe-64:
extends: .build
allow_failure: true
variables:
VK_LOADER_DRIVERS_SELECT: 'lvp_*'
+
+build-radv-32:
+ extends: .build
+ tags:
+ - amd-gpu
+ variables:
+ VK_LOADER_DRIVERS_SELECT: 'radeon_*'
+ CC: 'gcc -m32'
+
+build-llvmpipe-32:
+ extends: .build
+ allow_failure: true
+ variables:
+ VK_LOADER_DRIVERS_SELECT: 'lvp_*'
+ CC: 'gcc -m32'
Module: wine
Branch: master
Commit: da74da2939183cbfa06324114135b3e769b7c40a
URL: https://gitlab.winehq.org/wine/wine/-/commit/da74da2939183cbfa06324114135b3…
Author: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
Date: Sat Sep 2 18:24:49 2023 +0900
loader: Don't return from __stack_chk_fail() stub in preloader.
GCC expects __stack_chk_fail() to be noreturn[1]. Returning from
__stack_chk_fail() can thus lead to subtle failures.
When crashing, use a volatile NULL pointer dereference. Ideally we
would like to "abort()" here, but doing so would require two more
syscall definitions just for a cold function. After all, the function
isn't even used at all if -fno-stack-protector is specified.
Also, don't say "stack smashing" (unlike glibc). The preloader
currently initializes the stack canary value to a fixed value (0), which
serves little value in protecting against actual buffer overrun attacks.
[1]: https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gccint/Stack-Smashing-Protection.h…
---
loader/preloader.c | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/loader/preloader.c b/loader/preloader.c
index 42959bcb49a..d0551bae63a 100644
--- a/loader/preloader.c
+++ b/loader/preloader.c
@@ -175,11 +175,6 @@ struct wld_auxv
*/
void __bb_init_func(void) { return; }
-/* similar to the above but for -fstack-protector */
-void *__stack_chk_guard = 0;
-void __stack_chk_fail_local(void) { return; }
-void __stack_chk_fail(void) { return; }
-
#ifdef __i386__
/* data for setting up the glibc-style thread-local storage in %gs */
@@ -759,6 +754,33 @@ static __attribute__((noreturn,format(printf,1,2))) void fatal_error(const char
wld_exit(1);
}
+/*
+ * The __stack_chk_* symbols are only used when file is compiled with gcc flags
+ * "-fstack-protector". This function is normally provided by libc's startup
+ * files, but since we build the preloader with "-nostartfiles -nodefaultlibs",
+ * we have to provide our own version to keep the linker happy.
+ */
+unsigned long __stack_chk_guard = 0;
+
+void __attribute__((noreturn)) __stack_chk_fail(void)
+{
+ static const char message[] = "preloader: stack overrun detected, crashing\n";
+
+ /* Avoid using non-syscall functions that can re-enter this function */
+ wld_write(2, message, sizeof(message) - 1);
+
+ /* Deliberate induce crash and possibly dump core */
+ *(volatile char *)0;
+
+ /* Last resort if the zero page turns out to be actually readable */
+ wld_exit(1);
+}
+
+void __attribute__((noreturn)) __stack_chk_fail_local(void)
+{
+ __stack_chk_fail();
+}
+
#ifdef DUMP_AUX_INFO
/*
* Dump interesting bits of the ELF auxv_t structure that is passed