Skip to content

Commit

Permalink
multimedia/arcan: unbreak KMS support after cb7c09a
Browse files Browse the repository at this point in the history
$ arcan console
pid 12345 (arcan), jid 0, uid 1111: exited on signal 6 (no core dump - bad address)
$ tail -1 /var/log/messages
Sep 29 22:48:36 localhost arcan[12345]: stack overflow detected; terminated

(lldb) bt
* thread #2, name = 'arcan', stop reason = signal SIGABRT
  * frame #0: 0x00000008277faf5a libc.so.7`__sys_kill at kill.S:4
    frame #1: 0x00000008277fe361 libc.so.7`__fail(msg="stack overflow detected; terminated") at stack_protector.c:120:8
    frame #2: 0x00000008277fe2d0 libc.so.7`__stack_chk_fail at stack_protector.c:127:2
    frame #3: 0x00000000002eb876 arcan`button_count(fd=5, bitn=1, got_mouse=0x000000082040a5cf, got_joy=0x000000082040a5ce) at event.c:0
(lldb) f 3
frame #3: 0x00000000002eb876 arcan`button_count(fd=5, bitn=1, got_mouse=0x000000082040a5cf, got_joy=0x000000082040a5ce) at event.c:0
   844  #define bit_isset(ary, bit) (( ary[bit_longn(bit)] >> bit_ofs(bit)) & 1)
   845  #define bit_count(x) ( ((x) - 1 ) / (sizeof(long) * 8 ) + 1 )
   846
-> 847  static size_t button_count(int fd, size_t bitn, bool* got_mouse, bool* got_joy)
   848  {
   849          size_t count = 0;
   850

PR:		274163
Reported by:	Albin "a12l" Otterhäll
  • Loading branch information
jbeich committed Sep 30, 2023
1 parent a6a8311 commit 2258b3e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion multimedia/arcan/Makefile
@@ -1,6 +1,6 @@
PORTNAME= arcan
DISTVERSION= 0.6.2.1
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= multimedia

PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
Expand Down
15 changes: 15 additions & 0 deletions multimedia/arcan/files/patch-platform_cmake_CMakeLists.BSD
@@ -0,0 +1,15 @@
Partially revert https://github.com/letoram/arcan/commit/3c1674a8f5db

--- platform/cmake/CMakeLists.BSD.orig 2022-10-12 20:23:54 UTC
+++ platform/cmake/CMakeLists.BSD
@@ -74,6 +74,10 @@ else()
set(BSD_VARIANT_DEFINITIONS
-DCLOCK_MONOTONIC_RAW=CLOCK_REALTIME_FAST)

+# FreeBSD 12.1 enabled evdev but Arcan crashes
+ if(${INPUT_PLATFORM} STREQUAL "evdev")
+ SET(INPUT_PLATFORM "syscons")
+ endif()
if (VIDEO_PLATFORM STREQUAL "egl-dri")
list(APPEND ARCAN_PLATFORM ${PLATFORM_PATH}/psep_open.c)
else()

0 comments on commit 2258b3e

Please sign in to comment.