From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id A66CB4C9A7 for ; Mon, 10 Feb 2025 12:40:59 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A55F368BDDB; Mon, 10 Feb 2025 14:40:55 +0200 (EET) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C860368B482 for ; Mon, 10 Feb 2025 14:40:48 +0200 (EET) Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-308f71d5efcso1715031fa.3 for ; Mon, 10 Feb 2025 04:40:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1739191248; x=1739796048; darn=ffmpeg.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=Afio/NOrJFf93ccjBxNWY2xPpDYPNHARzAQHZEly/3A=; b=vdGmgKa3ghBGVVfyzDY8DCDjZWo7Ng0iJejnwlazeu1rVa5Rffhc0tjR4UZw291X4y fwmAWv4ZQbqtce59OfUj5t+BuOrqjz6l5PL6oeWryL4DIObCOtgb9yYgv1m8zB/cmF5P qDkD+dIpKz0U9HnXNSm0VZaTeoEksObbMo4C7xdFQ+Sne4BjlQVGt7CkYtKBMsm8xcTU n10p7pw8xt97bLI4CuM8CDEK1TwJtW0IYK3UYLMljL3kRQqqSUyIJIxUGbbbvxpj73sS Q1bs3YRXKEjuZFPbdPLgdvXIWdm0SgY0DwQcEZyEpgHEGcTmwRsqalvx/9ZSiwLgSjGV RnDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739191248; x=1739796048; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Afio/NOrJFf93ccjBxNWY2xPpDYPNHARzAQHZEly/3A=; b=BzK+VUm/f0eKJzwNeLNUeOvDC0HCTz0PceqrBHR19dzsQSmNon2534eP5sf+nrwdZU 90gAidDlHRtfjgMteyvztai/oC/W1kGNlfJQTq2flgzj7r0FssCnOfse2dSX2oDAyVRj qrh+rOWQv2hnK8Sp1LcnauwqGHEa5/6jgTZdQD53d+BGMb9gkGzScLXTLPDfvOgo1/7g M/nDmhvEndCf2RwY7Gr6VOJmVpGzAfnaXkYp3pvvKgHn6s8yHXnHPBs5ZfQGFZtmLLmr j1joNuXRIOB/J4Va9BAFTFuDtaNAlmsLt2aqI4WAEiat188H4rHnF5QSRtQzWQlDYRFP SEkw== X-Gm-Message-State: AOJu0YyvYwSFR2whKASsFePjtFFugfkc91F/SoLZHrXBXMKZ6JHvTKAl XQrGJ7AaPCciCqdTwzv6LdNk14sEXV72+C6ucgiUzBVA/JNOip6jy7liMhipWJVUyBa+D9H8J89 X9g== X-Gm-Gg: ASbGnct0vU+BrbEEjrpZOKhzu2s61SuL+GTFDg7njHWN2nJ4KZUzrLzAPw29q2SM58H DQawEgEEqZ709fLBCsIrZhgNn/pEeOSCek3kxoLxKHk6xYtPXnG6WkQw/15cyavLeiloJKX6DxY QIz/YDLfaLdGHr3DFurBv0hs42xv4Ymz3p8GAqguC6H/4xuQeUnCouciHQn4McZxQu3FLAd2L5b TT7By538RvM9d22blitn7gPs5kXKU3ebpwucA/2vkNAFSBZgU8QgrGw4j8RSiKpzAxnsQ995Q5H rvnWJmBxnepZ5XT6xv0fhBz5zRvBoo6NLKZw3zXTmcRXaxgqR6zdb9ME9JddfkCztK8HzW1EFm5 61qDJh8xtDTw= X-Google-Smtp-Source: AGHT+IH7A+hca+MLjkVMPbdPOby0DbeGVuZb5DszdyV03KreDI7J70Eqq0N3RH8Y5Msa/5OXJ+BKaA== X-Received: by 2002:a2e:be89:0:b0:300:330d:a5c4 with SMTP id 38308e7fff4ca-307e580037fmr35866151fa.10.1739191247805; Mon, 10 Feb 2025 04:40:47 -0800 (PST) Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-308f60a4a12sm683201fa.11.2025.02.10.04.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2025 04:40:47 -0800 (PST) Date: Mon, 10 Feb 2025 14:40:46 +0200 (EET) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: Kieran Kunhya via ffmpeg-devel In-Reply-To: Message-ID: <9f99fb7-7218-e2d4-57fb-be187149cefa@martin.st> References: MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] checkasm/v210enc.c: Use checkasm_check_type X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Kieran Kunhya Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Sat, 8 Feb 2025, Kieran Kunhya via ffmpeg-devel wrote: > $subj > - if (memcmp(y0, y1, BUF_SIZE * sizeof(type)) \ > - || memcmp(u0, u1, BUF_SIZE * sizeof(type) / 2) \ > - || memcmp(v0, v1, BUF_SIZE * sizeof(type) / 2) \ > - || memcmp(dst0, dst1, width * 8 / 3)) \ > + if (checkasm_check_##type(NULL, 0, y0, 0, y1, 0, BUF_SIZE, 0, NULL) \ > + || checkasm_check_##type(NULL, 0, u0, 0, u1, 0, BUF_SIZE / 2, 0, NULL) \ > + || checkasm_check_##type(NULL, 0, v0, 0, v1, 0, BUF_SIZE / 2, 0, NULL) \ > + || checkasm_check_uint8_t(NULL, 0, dst0, 0, dst1, 0, (width * 8 / 3), 0, NULL)) \ This actually doesn't detect any failures at all; you're passing it parameters for checking a buffer of BUF_SIZE width and 0 height, so it doesn't check anything. By passing height 1, it does seem to work as intended (detecting an intentionally added error in the asm). It feels a little bit unwieldy to check (and print out, if checkasm is run with "-v") the whole BUF_SIZE, but it's good to have testing for potential writes out of bounds at least, like before. Further in dav1d there are more improvements to these checkasm helpers, which we haven't backported to ffmpeg yet, that helps with allocating padded buffers and checking that the padding isn't overwritten; that would allow reducing the size of the checked area, to make it easier to read on errors too. But until that's backported, I guess this is fine, if you change the height to 1. // Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".