From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id EB2B74E5D1 for ; Tue, 24 Feb 2026 21:33:00 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'cFJ0BEVy47NqE/lqPZ0scIFdg345M7sUzIeaZbRotAM=', expected b'1BLLa2jRRT4aFI81bF/SmFOgn5+4kulkNzBg7/xHU5U=')) header.d=proton.me header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1771953439; h=date : to : message-id : in-reply-to : references : mime-version : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=Xddh9OjHb25KvGZaIk9rkCd5fTN36wSBK7TOTmiRfQY=; b=k8aXlMqawq3uB5TfKg17D64yrEciITYdoIzoIjNl4ShKpKYFzeSgFE17Zzb9GGeej8Fa6 owGiGTaKja+gFX+dYrK6JyII7+t7jIsF+OSzMEp4rQVFnvoKh7Yu7v0gULfZo3o7b5vbnS0 LgBYTUovRlblfFDfzKG9d22JqFHi5MIOjl1Noq224/nuYHKGdriAhigf8CO+Zn0wyd3zuTb nncK88EWzGZImN/tlBAtiWUW/yWnFY7i0FPh1nflCnY3mspgfJOgt6OlXDpBtz6EYtAHLBD cwOTmna+IEP8XjvKJfeejuF9qey28KymovMQXIwOXkj84uh5VE63AQORiakQ== Received: from [172.18.0.3] (unknown [172.18.0.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 2EA0A691702; Tue, 24 Feb 2026 19:17:19 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1771953431; b=ADRsTOMdk0+03/bLIzpNd7c/PGR2OZXLPcJkMEF6B2OCh6tQCYKXor4IEKTHfP66KTSSN as/eDMmRUUUpUr9AtqaaHOuUTb4Lt0MsYfup9TEe2dkdftTgcCTG33/JZE2z8CVxJA472Os 5ltJABFf7p4ahLhwxYByNKruk+ay4RjSdBDF2R83uUx2FJhuo/YGWSDuEbJWgigw2lNgBWO VWez4IBWFrRUwrfxmtLqTTkt9Xr4/yS9Yon7pu/4xyxGH8ZqHKCZ0PxySZcx1oKxWqaDT34 m+XWWvlC2009YP3JJRPYVD5QvUgP/YbnFIH3Ly1d5ClfheWhpgKmVbi1nUfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1771953431; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=cFJ0BEVy47NqE/lqPZ0scIFdg345M7sUzIeaZbRotAM=; b=Pa9NMZSngYBZnpqbL5zxAqNprBS13oJSoPd+qzGqa7CR0C912mBVMhI2WZUweCqS19b/I maAphL+51fu64sI+/KLRqoVjMXjtheow34CSheo4qszF57wR3wbNlJw8Pzlr6MTJhQ7rSv4 F8JddOCveLWIGpXYILBYgZOnEdXuj0qS9cLHJFPLwVaE+lzzsvQtTm/BSf2x8hBVFNm+iQE IZblJQwKtpS0mH+sBeIysn0XUELKBgG8Q3aJtZAUT2WVCFD+X1urRMT7Nutg/6GUw7FNsYY ngkx2lzMCsmzNnV6bDSTIOiafGx7l1KoP1KFMutUgQvAU3uco1wDKDmbMPzw== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=proton.me; arc=none; dmarc=pass header.from=proton.me policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=proton.me; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=proton.me policy.dmarc=quarantine Received: from mail-4319.protonmail.ch (mail-4319.protonmail.ch [185.70.43.19]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id C7A256910A7 for ; Sun, 22 Feb 2026 05:21:40 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1771730500; x=1771989700; bh=1BLLa2jRRT4aFI81bF/SmFOgn5+4kulkNzBg7/xHU5U=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=cD546bSzDC2+R4+0YQVny+kR0xhJib8MNfTaToKA4O6APDfLdW5ujaodSIv/SusGg omHmfO0hKiOpCioSj1+p2ZxLp95DVcAQ/qNj1UAwlvu6x6s/FMB3zVbubN5emVsqE9 Th5bBGTJ3SDfqDti38EBFNbDShAVA+v3KT2YVzaSUiqOSBZXvkbqdI6maTSK+DdSqL BPVmKWLuAiTqHm2oLUH1Pwg/FxONetBWgYkveDlS4QHK0Enrk5VhoPKEsazCORxdpj zYjqOZOyOhKtGK6Fj0AiKQgg+vbjEsguuXMJJMq2BmLjEAa/42pTDRBZbZ1OIVfPv5 bZuj8+Vjyli6w== Date: Sun, 22 Feb 2026 03:21:35 +0000 To: ffmpeg-devel@ffmpeg.org Message-ID: <20260222031845.94293-6-jfiusdq@proton.me> In-Reply-To: <20260222031845.94293-2-jfiusdq@proton.me> References: <20260222031845.94293-2-jfiusdq@proton.me> Feedback-ID: 167378330:user:proton X-Pm-Message-ID: 735a6bbd9b33ae2e3bf620d4c0a6084b1d22d815 MIME-Version: 1.0 X-MailFrom: SRS0=j8RT=A2=proton.me=jfiusdq@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation Message-ID-Hash: QMQCGI2MSIVZBXJ2MKRG6ZO443ROQENA X-Message-ID-Hash: QMQCGI2MSIVZBXJ2MKRG6ZO443ROQENA X-Mailman-Approved-At: Tue, 24 Feb 2026 17:15:55 +0000 X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH 4/6] swscale/ops: use _Bool to avoid altivec bool macro List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: jfiusdq via ffmpeg-devel Cc: jfiusdq Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: util_altivec.h redefines bool to __bool, so when ops.h is included from graph.c the SwsComps/SwsOpList layout changes. ops.c and graph.c then disagree on struct size, leading to heap corruption. Use _Bool in ops.h for fields and prototypes that must be layout-stable, avoiding the macro substitution. Signed-off-by: jfiusdq --- libswscale/ops.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libswscale/ops.h b/libswscale/ops.h index 9f93c12fa8..8f96c1e7d9 100644 --- a/libswscale/ops.h +++ b/libswscale/ops.h @@ -38,7 +38,7 @@ typedef enum SwsPixelType { const char *ff_sws_pixel_type_name(SwsPixelType type); int ff_sws_pixel_type_size(SwsPixelType type) av_const; -bool ff_sws_pixel_type_is_int(SwsPixelType type) av_const; +_Bool ff_sws_pixel_type_is_int(SwsPixelType type) av_const; typedef enum SwsOpType { SWS_OP_INVALID = 0, @@ -88,7 +88,7 @@ static_assert(sizeof(SwsConst) == sizeof(AVRational) * 4, typedef struct SwsComps { unsigned flags[4]; /* knowledge about (output) component contents */ - bool unused[4]; /* which input components are definitely unused */ + _Bool unused[4]; /* which input components are definitely unused */ /* Keeps track of the known possible value range, or {0, 0} for undefined * or (unknown range) floating point inputs */ @@ -98,7 +98,7 @@ typedef struct SwsComps { typedef struct SwsReadWriteOp { uint8_t elems; /* number of elements (of type `op.type`) to read/write */ uint8_t frac; /* fractional pixel step factor (log2) */ - bool packed; /* read multiple elements from a single plane */ + _Bool packed; /* read multiple elements from a single plane */ /** Examples: * rgba = 4x u8 packed @@ -133,7 +133,7 @@ typedef struct SwsSwizzleOp { typedef struct SwsConvertOp { SwsPixelType to; /* type of pixel to convert to */ - bool expand; /* if true, integers are expanded to the full range */ + _Bool expand; /* if true, integers are expanded to the full range */ } SwsConvertOp; typedef struct SwsDitherOp { @@ -253,7 +253,7 @@ SwsOpList *ff_sws_op_list_duplicate(const SwsOpList *ops); * Returns whether an op list represents a true no-op operation, i.e. may be * eliminated entirely from an execution graph. */ -bool ff_sws_op_list_is_noop(const SwsOpList *ops); +_Bool ff_sws_op_list_is_noop(const SwsOpList *ops); /** * Returns the size of the largest pixel type used in `ops`. -- 2.47.3 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org