Hi,

Sorry this took so long,

On 6/15/23 06:49, Sebastien Marie wrote:
On Wed, Jun 14, 2023 at 10:49:32PM +0200, Peter N. M. Hansteen wrote:
A similar situation with hexchat, after a fresh sysupgrade and reinstall of 
that package:
https://marc.info/?l=openbsd-ports&m=168667722510843&w=2 (I included it below).

It was first reported with neovim, but I found later that neovim was using
embedded version of luajit (so patching lang/luajit port was ineffective).

hexchat is using lang/luajit, so is it possible to test it ?

On the amd64 snapshot available this morning and a cvs checkout of the ports tree at approximately the same time, rebuilding luajit and hexchat after applying the patch unfortunately hexchat still dies with an illegal instruction --

[Fri Jun 23 10:57:00] peter@zaida:~$ hexchat &
[1] 19782
(failed reverse-i-search)`gdg': e^Cb hexchat hexchat.core
[1]+  Illegal instruction     (core dumped) hexchat

and

[Fri Jun 23 10:57:34] peter@zaida:~$ egdb hexchat hexchat.core
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-openbsd7.3".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from hexchat...
(No debugging symbols found in hexchat)
[New process 119276]
[New process 229173]
[New process 110328]
[New process 331535]
Core was generated by `hexchat'.
Program terminated with signal SIGILL, Illegal instruction.
#0 0x00000398f0d44992 in lj_BC_FUNCC () from /usr/local/lib/libluajit-5.1.so.1.0
[Current thread is 1 (process 119276)]
(gdb) bt
#0 0x00000398f0d44992 in lj_BC_FUNCC () from /usr/local/lib/libluajit-5.1.so.1.0 #1 0x00000398f0db3d7a in luaL_openlibs () from /usr/local/lib/libluajit-5.1.so.1.0
#2  0x00000398abf3ef07 in ?? () from /usr/local/lib/hexchat/plugins/lua.so
#3 0x00000398abf3db22 in hexchat_plugin_init () from /usr/local/lib/hexchat/plugins/lua.so
#4  0x000003969ff5520c in plugin_add ()
#5  0x000003969ff5739f in plugin_load ()
#6  0x000003969ff5747e in ?? ()
#7  0x000003969ff68a6f in for_files ()
#8  0x000003969ff5742e in plugin_auto_load ()
#9  0x000003969ff4251a in new_ircwindow ()
#10 0x000003969ff60b5f in servlist_connect ()
#11 0x000003969ff60ee7 in servlist_auto_connect ()
#12 0x000003969ff431cd in ?? ()
#13 0x00000398bd7223ef in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.4201.10 #14 0x00000398bd722757 in g_main_context_iterate () from /usr/local/lib/libglib-2.0.so.4201.10 #15 0x00000398bd722b6a in g_main_loop_run () from /usr/local/lib/libglib-2.0.so.4201.10 #16 0x00000399924967a7 in gtk_main () from /usr/local/lib/libgtk-x11-2.0.so.2400.0
#17 0x000003969ff0720b in fe_main ()
#18 0x000003969ff4317d in main ()
(gdb) disassemble
Dump of assembler code for function lj_BC_FUNCC:
=> 0x00000398f0d44992 <+0>:    mov    -0x8(%rdx),%ebp
   0x00000398f0d44995 <+3>:       mov    0x18(%rbp),%r15
   0x00000398f0d44999 <+7>:       mov    0x18(%rsp),%ebp
   0x00000398f0d4499d <+11>:      lea    -0x8(%rdx,%rax,8),%eax
   0x00000398f0d449a1 <+15>:      mov    %edx,0x10(%rbp)
   0x00000398f0d449a4 <+18>:      lea    0xa0(%rax),%ecx
   0x00000398f0d449aa <+24>:      cmp    0x20(%rbp),%ecx
   0x00000398f0d449ad <+27>:      mov    %eax,0x18(%rbp)
   0x00000398f0d449b0 <+30>:      mov    %ebp,%edi
   0x00000398f0d449b2 <+32>:      ja     0x398f0d44b78 <lj_vm_growstack_c>
   0x00000398f0d449b8 <+38>:      movl   $0xfffffffe,-0xad0(%r14)
   0x00000398f0d449c3 <+49>:      callq  *%r15
   0x00000398f0d449c6 <+52>:      movl   $0xffffffff,-0xad0(%r14)
   0x00000398f0d449d1 <+63>:      mov    0x10(%rbp),%edx
   0x00000398f0d449d4 <+66>:      lea    (%rdx,%rax,8),%ecx
   0x00000398f0d449d7 <+69>:      neg    %ecx
   0x00000398f0d449d9 <+71>:      add    0x18(%rbp),%ecx
   0x00000398f0d449dc <+74>:      mov    -0x4(%rdx),%ebx
   0x00000398f0d449df <+77>:      jmp    0x398f0d44a58 <lj_vm_returnc>
End of assembler dump.
(gdb) quit

I hope this is still useful. I hope to be more responsive over the next few weeks.

All the best,
Peter

--
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.

Reply via email to