We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
iallocate
It looks like this code passes 0 as the VM argument to allocCon and that causes a crash in iallocate in current Idris.
VM
allocCon
(lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x180) * frame #0: 0x0000000100023157 example`iallocate + 100 frame #1: 0x0000000100000f61 example`allocConF + 49 frame #2: 0x0000000100000f20 example`idris_makeArray + 32 frame #3: 0x000000010000a018 example`_idris_Data_46_Array_46_prim_95_makeArray + 136 frame #4: 0x0000000100017612 example`_idris_Data_46_Array_46_IOArray_46__123_fromList_95_7_125_ + 290 frame #5: 0x0000000100006160 example`_idris_io_95_bind + 320 frame #6: 0x0000000100020b76 example`_idris__123_runMain_95_0_125_ + 310 frame #7: 0x0000000100022c9e example`main + 142 frame #8: 0x00007fff6f29a7fd libdyld.dylib`start + 1
The text was updated successfully, but these errors were encountered:
I guess I should use https://github.com/ejconlon/ixarray or Data.IOArray anyhow, but it seems like this is the fix:
diff --git a/Array.c b/Array.c index b36a471..17bfb54 100644 --- a/Array.c +++ b/Array.c @@ -3,7 +3,7 @@ VAL idris_makeArray(int len) { VAL arr; - allocCon(arr, 0, 0, len, 0); + allocCon(arr, get_vm(), 0, len, 0); return arr; }
Sorry, something went wrong.
Pass get_vm to allocCon
9298e8d
Prevents null dereference crash Fixes idris-hackers#4
Successfully merging a pull request may close this issue.
It looks like this code passes 0 as the
VM
argument toallocCon
and that causes a crash iniallocate
in current Idris.The text was updated successfully, but these errors were encountered: