Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#3496: Fix crash in drmgr-test #4008

Merged
merged 2 commits into from
Jan 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions suite/tests/client-interface/drmgr-test.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* **********************************************************
* Copyright (c) 2011-2019 Google, Inc. All rights reserved.
* Copyright (c) 2011-2020 Google, Inc. All rights reserved.
* **********************************************************/

/*
Expand Down Expand Up @@ -323,13 +323,17 @@ main(int argc, char **argv)
/* Test xsave for drutil_opnd_mem_size_in_bytes. We're assuming that
* xsave support is available and enabled, which should be the case
* on all machines we're running on.
* Ideally we'd run whatever cpuid invocations are needed to figure out the exact
* size but 16K is more than enough for the foreseeable future: it's 576 bytes
* with SSE and ~2688 for AVX-512.
*/
char ALIGN_VAR(64) buffer[2048];
__asm("or $-1, %%eax\n"
"\txsave %0"
char ALIGN_VAR(64) buffer[16 * 1024];
__asm("xor %%edx, %%edx\n\t"
"or $-1, %%eax\n\t"
"xsave %0\n\t"
: "=m"(buffer)
:
: "eax");
: "eax", "edx", "memory");
# endif

intervals = 10;
Expand Down