Skip to content
Snippets Groups Projects
Commit b806b617 authored by Nguyen Anh Quynh's avatar Nguyen Anh Quynh
Browse files

Merge pull request #151 from...

Merge pull request #151 from practicalswift/add-crash-28-x64-llvm-error-unable-to-evaluate-offset-for-variable

Add LLVM error crash case.
parents 5f3c7cbe 2c8fff1f
No related branches found
No related tags found
No related merge requests found
#include <keystone/keystone.h>
int main(int argc, char **argv) {
int ks_arch = KS_ARCH_X86, ks_mode = KS_MODE_64;
unsigned char assembly[] = {
'x', '=', 'y', '-', '-', 'y', ';', '.', '=', 'x',
'-', 'y', 0x00,
};
ks_engine *ks;
ks_err err = ks_open(ks_arch, ks_mode, &ks);
if (!err) {
size_t count, size;
unsigned char *insn;
if (ks_asm(ks, (char *)assembly, 0, &insn, &size, &count))
printf("ERROR: failed on ks_asm() with error = %s, code = %u\n", ks_strerror(ks_errno(ks)), ks_errno(ks));
ks_free(insn);
}
ks_close(ks);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment