Skip to content

Instantly share code, notes, and snippets.

@wmealing
Created October 9, 2020 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wmealing/2a1a724b267cdde1a2727d8c7a5cb0f4 to your computer and use it in GitHub Desktop.
Save wmealing/2a1a724b267cdde1a2727d8c7a5cb0f4 to your computer and use it in GitHub Desktop.
this should be crashing on tsx disabled systems.
#include <stdio.h>
int main()
{
int x = 0;
while (x < 100000) {
asm ("xbegin ABORT");
x++;
asm ("xend");
asm ("ABORT:");
}
printf("%d\n", x);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment