On Tue, Jan 26, 2016 at 1:47 PM, Bryan Rivera <[email protected]> wrote:
> Why are these ops causing a segfault?
>
> unsafe_pointer_to_objref( Ptr{UInt32}(1000) )
>
>
> unsafe_load( Ptr{UInt32}(1000) )

It's unclear what do you want to do here. The code you've written
roughly correspond to

void *dummy1 = *(volatile void**)(1000L - sizeof(void*));
uint32_t dummy2 = *(volatile uint32_t*)(1000L);

in c and these are guaranteed to segfault badly.

>
> The only reason I am using a pointer is because of a C function call.
>
> When I try to write a test using only Julia, it fails.  The load is what I
> narrowed it down to.

Reply via email to