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

Crashes on first call to uc_xxx #2062

Closed
Nuxar1 opened this issue Dec 5, 2024 · 4 comments
Closed

Crashes on first call to uc_xxx #2062

Nuxar1 opened this issue Dec 5, 2024 · 4 comments

Comments

@Nuxar1
Copy link

Nuxar1 commented Dec 5, 2024

0xC0000005: Access violation writing location 0x000001EF93F60000.

uc_init_engine->machine_initialize->tcg_exec_init->tcg_prologue_init->tcg_target_qemu_prologue->tcg_out_push->tcg_out8

*s->code_ptr++ = v;

with the code

	uc_err err;
	if ((err = uc_open(UC_ARCH_X86, UC_MODE_64, &uc)) != UC_ERR_OK) {
		printf("Failed to initialize unicorn engine: %s\n", uc_strerror(err));
		return;
	}

	if ((err = uc_hook_add(uc, &mem_hook, UC_HOOK_MEM_READ, (void*)mem_hook_callback, this, 1, 0)) != UC_ERR_OK) {
		printf("Failed to add memory hook: %s\n", uc_strerror(err));
		return;
	}
@wtdcode
Copy link
Member

wtdcode commented Dec 6, 2024 via email

@KenionX
Copy link

KenionX commented Dec 8, 2024

@wtdcode No offence, but how dereferencing a null pointer and causing exceptions is as design? I am also stuck on the old version since this new behavior is just insane to deal with. Even without VS debugger attached it causes crashes from time to time.

@wtdcode
Copy link
Member

wtdcode commented Dec 9, 2024

@wtdcode No offence, but how dereferencing a null pointer and causing exceptions is as design? I am also stuck on the old version since this new behavior is just insane to deal with. Even without VS debugger attached it causes crashes from time to time.

If you read the bug report, the pointer is obviously not null (0x000001EF93F60000).

@wtdcode
Copy link
Member

wtdcode commented Jan 4, 2025

Closing as no activity.

@KenionX submit another issue if you found null pointer dereference.

@wtdcode wtdcode closed this as completed Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants