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

Migrate to rebar3 #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jiahuili430
Copy link

No description provided.

nickva added a commit that referenced this pull request Jun 14, 2023
We have allocate size($item) then cast the result to a pointer of that item.

This was discovered on macos with otp 25

```
Process 71176 stopped
* thread #16, name = '11_scheduler', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x00007ff81b74c363 libsystem_c.dylib`__chk_fail_overflow + 16
libsystem_c.dylib`:
->  0x7ff81b74c363 <+16>: ud2
libsystem_c.dylib`:
    0x7ff81b74c365 <+0>:  pushq  %rbp
    0x7ff81b74c366 <+1>:  movq   %rsp, %rbp
    0x7ff81b74c369 <+4>:  leaq   0x7966(%rip), %rdi        ; "detected source and destination buffer overlap"
Target 0: (beam.smp) stopped.
(lldb) bt
* thread #16, name = '11_scheduler', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
  * frame #0: 0x00007ff81b74c363 libsystem_c.dylib`__chk_fail_overflow + 16
    frame #1: 0x00007ff81b6dcf43 libsystem_c.dylib`__memset_chk + 18
    frame #2: 0x0000000147d1969b hqueue.so`hqueue_nif_insert [inlined] hqueue_nif_node_alloc at hqueue_nif.c:117:5 [opt]
    frame #3: 0x0000000147d1967a hqueue.so`hqueue_nif_insert(env=0x0000700008cb7d38, argc=3, argv=0x0000700008cb7e40) at hqueue_nif.c:296:18 [opt]
    frame #4: 0x00000001000351f2 beam.smp`beam_jit_call_nif(c_p=0x0000000142e6cad8, I=<unavailable>, reg=0x0000700008cb7e40, fp=(hqueue.so`hqueue_nif_insert at hqueue_nif.c:269), NifMod=<unavailable>)(enif_environment_t*, int, unsigned long*), erl_module_nif*) at beam_jit_common.cpp:563:26 [opt]
    frame #5: 0x000000014363856e
(lldb)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant