Skip to content

Instantly share code, notes, and snippets.

@hktechn0
Created February 9, 2015 09:26
Show Gist options
  • Save hktechn0/3c7b9c2f17325f87db75 to your computer and use it in GitHub Desktop.
Save hktechn0/3c7b9c2f17325f87db75 to your computer and use it in GitHub Desktop.
test overflow
#include <stdio.h>
int main(void)
{
volatile char test, i;
__asm__ volatile("mov $82, %0 \n"
"mov $0, %1 \n"
"addb $127, %0 \n"
"jno hogehoge \n"
"mov $1, %1 \n"
"hogehoge: nop": "=r"(test), "=r"(i));
printf("%d\n", i);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment