<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:0xe2.0x9a.0x9b@gmail.com" title="Jan Ziak <0xe2.0x9a.0x9b@gmail.com>"> <span class="fn">Jan Ziak</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTOURBUG - Metro 2033 Redux benchmark fails to start"
href="https://bugs.freedesktop.org/show_bug.cgi?id=95329">bug 95329</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>NOTOURBUG
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTOURBUG - Metro 2033 Redux benchmark fails to start"
href="https://bugs.freedesktop.org/show_bug.cgi?id=95329#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTOURBUG - Metro 2033 Redux benchmark fails to start"
href="https://bugs.freedesktop.org/show_bug.cgi?id=95329">bug 95329</a>
from <span class="vcard"><a class="email" href="mailto:0xe2.0x9a.0x9b@gmail.com" title="Jan Ziak <0xe2.0x9a.0x9b@gmail.com>"> <span class="fn">Jan Ziak</span></a>
</span></b>
<pre>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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>