#2695: [XSI] Implement SA_SIGINFO for sigaction ---------------------------+------------------------------------------------ Reporter: andreasf | Owner: axeld Type: enhancement | Status: reopened Priority: normal | Milestone: R1 Component: System/POSIX | Version: R1/pre-alpha1 Resolution: | Keywords: Blockedby: 1935 | Platform: All Blocking: | ---------------------------+------------------------------------------------ Changes (by andreasf): * status: closed => reopened * resolution: duplicate => Comment: Following a discussion on HaikuPorts-devs about how to handle lack of {{{SA_SIGINFO}}}, I've given this a new try. Not having implemented {{{sigqueue}}} or {{{waitid}}}, I'm reopening this ticket. Signals are actually queued in {{{signal.cpp}}} this time and the faulting address of a {{{SIGSEGV}}} is stuffed into {{{si_addr}}} in {{{vm.cpp}}}. The {{{x86/arch_thread.cpp}}} frame setup code is unchanged. Unfortunately it doesn't work yet, due to use of {{{malloc}}} while interrupts disabled. It's probably not thread-safe either. Comments on how to improve appreciated! KDL output follows, from QEMU during splash screen rocket: {{{ PANIC: memalign(): called with interrupts disabled Welcome to Kernel Debugging Land... Thread 12 "main2" running on CPU 0 stack trace for thread 12 "main2" kernel stack: 0x81d10000 to 0x81d14000 frame caller <image>:function + offset 0 81d13d5c (+ 32) 800df3c4 <kernel_x86>:arch_debug_stack_trace + 0x000f 1 81d13d7c (+ 16) 8006ce98 <kernel_x86> stack_trace_trampoline(void*: NULL) + 0x000b 2 81d13d8c (+ 12) 800e591a <kernel_x86>:arch_debug_call_with_fault_handler + 0x001b 3 81d13d98 (+ 48) 8006d38e <kernel_x86>:debug_call_with_fault_handler + 0x0053 4 81d13dc8 (+ 64) 8006e142 <kernel_x86> kernel_debugger_loop(char const*: 0x0 "<NULL>", char const*: 0x8011f8c0 "memalign(): called with interrupts disabled ", char*: 0x81d13e38, int32: -2147032130) + 0x0212 5 81d13e08 (+ 48) 8006e3dc <kernel_x86> kernel_debugger_internal(char const*: 0x0 "<NULL>", char const*: 0x8280c018 "", char*: 0x81d13e58, int32: -2147031636) + 0x0110 6 81d13e38 (+ 32) 8006e5bf <kernel_x86>:panic + 0x0023 7 81d13e58 (+ 80) 8004947f <kernel_x86>:memalign + 0x002a 8 81d13ea8 (+ 32) 8004976a <kernel_x86>:malloc + 0x0010 9 81d13ec8 (+ 48) 800592d9 <kernel_x86> deliver_signal(thread*: 0x828578bd, siginfo_t const*: NULL, uint32: 0x81d13f68) + 0x0077 10 81d13ef8 (+ 48) 80059919 <kernel_x86> send_signal_etc_AF(int32: -2116993200, siginfo_t const*: NULL, uint32: 0x24 (36)) + 0x00b5 11 81d13f28 (+ 80) 80059a9c <kernel_x86>:send_signal_etc + 0x0027 12 81d13f78 (+ 32) 80062a0e <kernel_x86>:resume_thread + 0x0022 13 81d13f98 (+ 64) 8004f0c7 <kernel_x86> main2(void*: NULL) + 0x01d6 14 81d13fd8 (+ 32) 80062150 <kernel_x86> _create_kernel_thread_kentry() + 0x0015 15 81d13ff8 (+2116993032) 80066487 <kernel_x86> thread_kthread_exit() + 0x0000 kdebug> }}} -- Ticket URL: <http://dev.haiku-os.org/ticket/2695#comment:10> Haiku <http://dev.haiku-os.org> Haiku - the operating system.