Summary: | Metro 2033 Redux benchmark fails to start | ||
---|---|---|---|
Product: | Mesa | Reporter: | Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0x9b> |
Component: | Drivers/Gallium/radeonsi | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED NOTOURBUG | QA Contact: | Default DRI bug account <dri-devel> |
Severity: | normal | ||
Priority: | medium | CC: | 0xe2.0x9a.0x9b, alexander |
Version: | git | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | user.cfg |
Description
Jan Ziak (http://atom-symbol.net)
2016-05-09 19:28:42 UTC
Created attachment 123583 [details]
user.cfg
The game itself (excluding the benchmark) runs OK with Mesa. The cause of the issue is in metro.bin, not in Mesa. Found via running "valgrind benchmark.sh". The following code fixes the issue: $ cat posix_memalign.c #include <errno.h> #include <malloc.h> #include <stdlib.h> #include <strings.h> int posix_memalign(void **memptr, size_t alignment, size_t size) { if(alignment < 32) { alignment = 32; // Optional. Might boost memcpy(). } size *= 2; // Required void *p = memalign(alignment, size); if(!p && size) { return ENOMEM; } bzero(p, size); // Optional *memptr = p; return 0; } $ gcc -m32 -shared -fPIC -O2 -g -Wall -Werror -std=c99 -o posix_memalign32.so posix_memalign.c $ gcc -m64 -shared -fPIC -O2 -g -Wall -Werror -std=c99 -o posix_memalign64.so posix_memalign.c $ export LD_PRELOAD="$PWD/posix_memalign32.so:$PWD/posix_memalign64.so:$LD_PRELOAD" $ .../Metro 2033 Redux/benchmark.sh Still reproducible in July 2018. Another workaround is possible with newer glibc: GLIBC_TUNABLES=glibc.malloc.check=3 ./benchmark.sh |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.