You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "nickva (via GitHub)" <gi...@apache.org> on 2023/06/14 22:18:17 UTC

[GitHub] [couchdb-hqueue] nickva opened a new pull request, #5: Fix alloc size in hqueue

nickva opened a new pull request, #5:
URL: https://github.com/apache/couchdb-hqueue/pull/5

   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)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-hqueue] chewbranca commented on pull request #5: Fix alloc size in hqueue

Posted by "chewbranca (via GitHub)" <gi...@apache.org>.
chewbranca commented on PR #5:
URL: https://github.com/apache/couchdb-hqueue/pull/5#issuecomment-1592066177

   LGTM, nice find @nickva!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-hqueue] nickva merged pull request #5: Fix alloc size in hqueue

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva merged PR #5:
URL: https://github.com/apache/couchdb-hqueue/pull/5


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org