head 1.1; access; symbols; locks; strict; comment @ * @; 1.1 date 2026.11.09.05.37.20; author jnemeth; state Exp; branches; next ; commitid nfklAD0yCz3anK2H; desc @@ 1.1 log @comms/asterisk24: import asterisk-24.0.0 Asterisk is a complete PBX in software. It provides all of the features you would expect from a PBX and more. Asterisk does voice over IP in three protocols, and can interoperate with almost all standards-based telephony equipment using relatively inexpensive hardware. Asterisk provides Voicemail services with Directory, Call Conferencing, Interactive Voice Response, Call Queuing. It has support for three-way calling, caller ID services, ADSI, SIP and H.323 (as both client and gateway). This is a Long Term Support version. It is scheduled to go to security fixes only on October 15th, 2030, and EOL on October 15th, 2031. See here for more information about Asterisk versions: https://docs.asterisk.org/About-the-Project/Asterisk-Versions/ @ text @$NetBSD: patch-main_bridge__channel.c,v 1.1 2025/10/27 06:58:39 jnemeth Exp $ * Fix segfault under NetBSD/aarch64 9.99.80. --- main/bridge_channel.c.orig 2021-12-09 16:52:10.000000000 +0000 +++ main/bridge_channel.c @@@@ -59,6 +59,13 @@@@ #include "asterisk/message.h" #include "asterisk/core_local.h" +/* XXX, pthread_equal() is misused to compare non-valid thread pointers */ +static int +pt_pthread_equal(pthread_t t1, pthread_t t2) +{ + return t1 == t2; +} + /*! * \brief Used to queue an action frame onto a bridge channel and write an action frame into a bridge. * \since 12.0.0 @@@@ -259,7 +266,7 @@@@ int ast_bridge_channel_notify_talking(st */ static void bridge_channel_poke(struct ast_bridge_channel *bridge_channel) { - if (!pthread_equal(pthread_self(), bridge_channel->thread)) { + if (!pt_pthread_equal(pthread_self(), bridge_channel->thread)) { /* Wake up the bridge channel thread. */ ast_queue_frame(bridge_channel->chan, &ast_null_frame); } @@@@ -952,7 +959,7 @@@@ static int bridge_channel_queue_action_d }; /* Make sure we don't end up trying to wait on ourself to deliver the frame */ - ast_assert(!pthread_equal(pthread_self(), bridge_channel->thread)); + ast_assert(!pt_pthread_equal(pthread_self(), bridge_channel->thread)); sync_payload = ast_alloca(sync_payload_len); sync_payload->id = ast_atomic_fetchadd_int(&sync_ids, +1); @