Message ID | 20240408141815.127984-1-j@lambda.is |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 406F93858426 for <patchwork@sourceware.org>; Mon, 8 Apr 2024 14:20:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx.kolabnow.com (mx.kolabnow.com [212.103.80.155]) by sourceware.org (Postfix) with ESMTPS id CA5D13858CD1 for <gcc-patches@gcc.gnu.org>; Mon, 8 Apr 2024 14:18:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CA5D13858CD1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lambda.is Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lambda.is ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CA5D13858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.103.80.155 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712585919; cv=none; b=tdQC3M1Dq3RacnfOfSfX+PaR1PkPutbn+N7y2efE6NOI9bFn1Yq+1IeuHiOpJ+lPhX+OL2fRxKc5So5Uc668P3rB8MDj3w5OxppKBZKcGS/jcPJVsN1VsnSquRrQSy33NC83JBn1So4FAqP9GqQwTFpMhG+HdUzRRRJHDk0aeiM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712585919; c=relaxed/simple; bh=gw0rlOnjRhV+pM/YmD+YzvJAO2XJAK4FVhas7/W5rxM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=SEFWORxbDtt8fLLqmHPNWceYvnnlKVdiJa+UcNXNhgqvtkwQem8j5Pkt3nETLdmgmiZvNCFQ5phNEtEXl5l1ye3NV2Qsnxjan2i3YpTZhtJEXrj/Z1NR0YpETMzHQwaOmUNCCLD5NFm6olAaBKUzFzidoH9Mq5oY/Iq8n+WzA9U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id B56082096DEB; Mon, 8 Apr 2024 16:18:33 +0200 (CEST) Authentication-Results: ext-mx-out011.mykolab.com (amavis); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20160331; t=1712585910; x=1714400311; bh=i6Q+CEj5x+vz0WURkmIyerZq5KF8fCVRhjtHMj5dWAY=; b=zfJkmGdpwK41 LkOmqpRG9wRZ47J9FauYofANiIyWCrX6PimkFbEGljAaeH3tqlHBTednAK5Ul36f gvwXB9R6aQNIrLXLqAevC+bilRBxJs3VNWrBaphaiw0r99aqxwTrT/WVdsdejc7y Kot6T/ST2CnVDVK4uNbX3ld1tCx5xfOy2wyU/wAQJnKq4HpmubAelup15C6MLVBC hB3hVq9S8fmkDCjZnmOO/6XtLR4i+XZvvCR7zf6kmdTn53NQieoFo8gtXs0ubxKc +BgKodxbGVoPSPHpdS7UIzw/YmZU8Z6dnHNK1mHRqdE5WUu0IOeLVFjD5/V/rXjT Tw3ilftExFD+nFU6zwIhLuhms9wWCnvVESGUuTPUak3Qtgd/LSeY2ZUVe0rKGBb4 fnwptj7t3jWZlwYm6Xoq20I+e9JN7spynzFhMKUN6A0WQQQPthLmnbK5J3Z7Ac8K 7pMgVMOMZUdE/6yiTzO0VeZoFCY9BL/+DFduS3Bt7f5PfADuP9QKU1jI3sxSsWHg 2uKHRXM1Tvjl/yB70dvY+TJ8zw1M6EpzRLbwADQMKa8PtOMMyy1u5L+frrcDsB6T g38MjQk/KpaeYydO3ryZ8NB/3iCYVOaUf6iUrU6NfcyIdzldfU+LrdIFyMatfM0S TGAY3s9Hac6pJrQLVMDnPDREAHagYGQ= X-Virus-Scanned: amavis at mykolab.com X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id KrbOr_yP4dUR; Mon, 8 Apr 2024 16:18:30 +0200 (CEST) Received: from int-mx011.mykolab.com (unknown [10.9.13.11]) by mx.kolabnow.com (Postfix) with ESMTPS id 38A5F2096DDA; Mon, 8 Apr 2024 16:18:27 +0200 (CEST) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx011.mykolab.com (Postfix) with ESMTPS id 84DF030FD27F; Mon, 8 Apr 2024 16:18:27 +0200 (CEST) From: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= <j@lambda.is> To: gcc-patches@gcc.gnu.org Cc: hjl.tools@gmail.com, rguenther@suse.de, hubicka@ucw.cz, sam@gentoo.org, =?utf-8?q?J=C3=B8rgen_Kvalsvik?= <j@lambda.is> Subject: [PATCH 0/2] More condition coverage fixes Date: Mon, 8 Apr 2024 16:18:13 +0200 Message-Id: <20240408141815.127984-1-j@lambda.is> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org |
Series |
More condition coverage fixes
|
|
Message
Jørgen Kvalsvik
April 8, 2024, 2:18 p.m. UTC
Here are two more patches for the condition coverage. Inlined conditions are actually counted this time, as the recorded expression mapping uses the new, deep-copied gconds as keys and not the pointers from the source function. The reported UB is gone when the number of conditions are exactly 64 (sizeof uint64_t), by slightly restructuring the loop generating constants. This passes check-gcc RUNTESTFLAGS=gcov.exp in my ubsan instrumented build: configure --enable-languages=c,c++ --enable-host-shared --enable-checking=release --disable-multilib --with-build-config=bootstrap-ubsan Jørgen Kvalsvik (2): Add tree-inlined gconds to caller cond->expr map Generate constant at start of loop, without UB gcc/testsuite/gcc.misc-tests/gcov-19.c | 37 ++++++++++++++++++++++ gcc/tree-inline.cc | 43 ++++++++++++++------------ gcc/tree-profile.cc | 20 +++++++++--- 3 files changed, 76 insertions(+), 24 deletions(-)