NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-evbarm/58683 (pthread_setaffinity_np() results on SIGSEGV on aarch64)



The following reply was made to PR port-evbarm/58683; it has been noted by GNATS.

From: Sad Clouds <cryintothebluesky%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: skrll%NetBSD.org@localhost, port-evbarm-maintainer%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost, gnats-admin%netbsd.org@localhost
Subject: Re: port-evbarm/58683 (pthread_setaffinity_np() results on SIGSEGV
 on aarch64)
Date: Sat, 21 Sep 2024 08:35:44 +0100

 It was a bit late last night, so decided to delay a small test program
 till next day, as the original code is quite big.
 
 Looks like it has nothing to do with pthread_setaffinity_np(). I
 stepped through the function calls and it was crashing in the error
 handling function, just after pthread_setaffinity_np().
 
 Each thread adjusts its stack size, as the default is way too big.
 NetBSD on aarch64 returns 4K from sysconf(_SC_THREAD_STACK_MIN), where
 Linux on aarch64 returns 128K.
 
 The stack size on NetBSD is then adjusted from 4K to 8K, as twice the
 minimum size of _SC_THREAD_STACK_MIN was deemed to be sufficient.
 
 However, during error handling function, which calls va_start() and
 va_end(), segfault is received due to insufficient stack space.
 
 Please close this bug as invalid.
 


Home | Main Index | Thread Index | Old Index