Skip to content

Commit

Permalink
silence compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Dec 22, 2013
1 parent ab372c3 commit 426c80a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ kern_return_t catch_exception_raise(mach_port_t exception_port,
ret = thread_get_state(thread,x86_EXCEPTION_STATE64,(thread_state_t)&exc_state,&exc_count);
HANDLE_MACH_ERROR("thread_get_state(1)",ret);
uint64_t fault_addr = exc_state.__faultvaddr;

This comment has been minimized.

Copy link
@stevengj

stevengj Dec 22, 2013

Author Member

@JeffBezanson, if you want to store fault_addr as an integer rather than a pointer, shouldn't it be uintptr_t?

This comment has been minimized.

Copy link
@JeffBezanson

JeffBezanson Dec 22, 2013

Member

We'll have to ask @loladiro . I only touched this code for formatting.

This comment has been minimized.

Copy link
@Keno

Keno Dec 23, 2013

Member

This is 64bit specific and the header declares it as a unit64_t IIRC.

This comment has been minimized.

Copy link
@staticfloat

staticfloat Dec 23, 2013

Member

It is. It's defined here, search for _STRUCT_X86_EXCEPTION_STATE64.

if (is_addr_on_stack(fault_addr)) {
if (is_addr_on_stack((void*) fault_addr)) {
ret = thread_get_state(thread,x86_THREAD_STATE64,(thread_state_t)&state,&count);
HANDLE_MACH_ERROR("thread_get_state(2)",ret);
old_state = state;
Expand Down

0 comments on commit 426c80a

Please sign in to comment.