From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id 37E08398B844 for ; Mon, 28 Jun 2021 19:06:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 37E08398B844 Received: by mail-ot1-x32f.google.com with SMTP id o17-20020a9d76510000b02903eabfc221a9so19969167otl.0 for ; Mon, 28 Jun 2021 12:06:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=Ql92wBustKFr/K/H/igaI/ug8K2RR2UZc1hiSl851zc=; b=aH8eLGwd5kY6ZOhS5PQLoWbod2oRQW0Jc5cOaeOtB3S7Aea8lVsC1g0NM1QzeNP81D uorpxnGOYwsBbRMqrKIbpoI02laXqEfrv+yn50Ve57zllBkvI5pKJeVJ9Quo3c2tjkjU ncd28oDSq9n3bJf6fJqALDhYPY2zjfplFa1VQAHyZVU3k3BEj42DJ3kdkxWQhokUkn16 3IKiEvW56p4Rz649ujsk3uRPSU2xsXj6CqjbhYdEyeTPtKt7lVzWpfcPx0nqvm+GqCja PxiBwEDlQ03awEC2DwI5jQfe/xLRmBAy67CVR7FiskyF5+0vMa4vaqXeUV9TNUn2REMj 3fVw== X-Gm-Message-State: AOAM532Hw7uNqRgS3AFTIN3tqMOLTJAwIZ6o2EzJvqAWWWuRJ6vFwOg+ 1+dGpbD9tRamnhPJBdfzq0kUV6fpr5DoGg== X-Google-Smtp-Source: ABdhPJyuW4gb//SoCZwtLCXeMUlPYXDDtuUKgouNyO0fKaWymKTE7iJ2lIBmW5S7xHEu6HLppAIm0w== X-Received: by 2002:a05:6830:1d72:: with SMTP id l18mr964070oti.150.1624907164350; Mon, 28 Jun 2021 12:06:04 -0700 (PDT) Received: from [192.168.0.41] (97-118-105-195.hlrn.qwest.net. [97.118.105.195]) by smtp.gmail.com with ESMTPSA id v17sm1656822oto.0.2021.06.28.12.06.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Jun 2021 12:06:04 -0700 (PDT) To: gcc mailing list From: Martin Sebor Subject: Using source-level annotations to help GCC detect buffer overflows Message-ID: <9152b814-b1e2-5bdb-a79a-0a2401e56a58@gmail.com> Date: Mon, 28 Jun 2021 13:06:03 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 19:06:07 -0000 I wrote an article for the Red Hat Developer blog about how to annotate code to get the most out of GCC's access checking warnings like -Warray-bounds, -Wformat-overflow, and -Wstringop-overflow. The article published last week: https://developers.redhat.com/articles/2021/06/25/use-source-level-annotations-help-gcc-detect-buffer-overflows Martin