From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ADCE1427E0; Mon, 20 Mar 2023 11:40:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8633440A7F; Mon, 20 Mar 2023 11:40:54 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id C305B406BC for ; Mon, 20 Mar 2023 11:40:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679308852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xfk7/zwKy7V6g/vNhaomb/lAGC9ZCSsbyNM8LNyc/k4=; b=aqTU0waHZT7zugiu6Oz/KeAhYGOYSnTLfZYPBKC8bLQK8ygOC1zMSIunecN7q/4kRTVttw 1WaYaZeW2XgwNBcRv/R8GJpNwqQnivH17HdCV8fweKBaUew9Ml7ZLhfiVGubaCGIdFk1yj begNlpIZar4EJc/7I4eS0LHzEHUBbnE= Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-389-U7Pn29x-MV-RUYCr2KBTug-1; Mon, 20 Mar 2023 06:40:51 -0400 X-MC-Unique: U7Pn29x-MV-RUYCr2KBTug-1 Received: by mail-pf1-f198.google.com with SMTP id a6-20020aa795a6000000b006262c174d64so3947622pfk.7 for ; Mon, 20 Mar 2023 03:40:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679308850; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xfk7/zwKy7V6g/vNhaomb/lAGC9ZCSsbyNM8LNyc/k4=; b=MRIKaEClcv9WPbRijyTWrZQCXZ8NBeNKmaOjAyoBVjJslxvGeb82ojMJC2xIhCENEs 2Rga1UbVQs3Z4zy8T4ACc42N+tISTizu/9TMcQteScddtHiCQTcunL+zIFeBnH7Y3V6u rkwbQrel2OJnXRAHmtwabcgoFzA0arYTB/i5Vr4yw3RTdNAs5c8p41pMwDvZdEG4EE7Y ZlFq2jTzRmWvszRlezFvgZ+AqH48vePOWfUWLqYaHxcnrFc6JO6fuW5uT6bRU0aUmwLC UaAUg9vpeI3fUrcsJJJ10LULIS56ZDb81iZH0xhN2IFRbHXzMNhNl7CHKjHSCSRJLS/E SOfg== X-Gm-Message-State: AO0yUKUpdD/3vB/MGkqGA46nVS+PHgNmYsZjBzILmZurhXP/sYXBbjWY KQK1zTHLVXzEeFKJzI40bC1kepN9HuQK+0AsTo0YtYDe1ZBHHK+2AlQ50/U3vmwgDCenhlHW/K4 Rojk2RQHf8UTcuGYX5z3/edLMNic= X-Received: by 2002:a65:691a:0:b0:50b:c2b7:4041 with SMTP id s26-20020a65691a000000b0050bc2b74041mr1919016pgq.5.1679308850081; Mon, 20 Mar 2023 03:40:50 -0700 (PDT) X-Google-Smtp-Source: AK7set/w6+zWbVy8wKS2vi9ROZL4SXNdPALlCMr9cFIt5xbHZDX3gp+1NL0XQeJqc9dkKgSOwahCouwuck2989IfeZk= X-Received: by 2002:a65:691a:0:b0:50b:c2b7:4041 with SMTP id s26-20020a65691a000000b0050bc2b74041mr1919010pgq.5.1679308849760; Mon, 20 Mar 2023 03:40:49 -0700 (PDT) MIME-Version: 1.0 References: <20230320102624.1258816-1-david.marchand@redhat.com> In-Reply-To: <20230320102624.1258816-1-david.marchand@redhat.com> From: David Marchand Date: Mon, 20 Mar 2023 11:40:37 +0100 Message-ID: Subject: Re: [PATCH 1/2] app/mldev: fix build with debug To: dev@dpdk.org Cc: Srikanth Yalavarthi , Anup Prabhu X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Mar 20, 2023 at 11:26=E2=80=AFAM David Marchand wrote: > ../app/test-mldev/test_inference_common.c:952:48: note: using the range > [-2147483648, 2147483647] for directive argument > 952 | snprintf(str, sizeof(str) - 1, "%s.%d", > | ^~~~~~~ > t->cmn.opt->filelist[req->fid].output, obj_idx); > ../app/test-mldev/test_inference_common.c:952:17: note: =E2=80=98snprintf= =E2=80=99 > output between 3 and 4108 bytes into a destination of size 4095 > 952 | snprintf(str, sizeof(str) - 1, "%s.%d", > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > t->cmn.opt->filelist[req->fid].output, obj_idx); [...] > > Fix unsigned integer format, and switch to dynamic allocations. > [...] > @@ -943,14 +948,20 @@ ml_request_finish(struct rte_mempool *mp, void *opa= que, void *obj, unsigned int > dump_output_fail: > if (t->cmn.opt->debug) { > /* dump quantized output buffer */ > - snprintf(str, PATH_MAX, "%s.q.%d", t->cmn.opt->filelist[r= eq->fid].output, obj_idx); > - ML_OPEN_WRITE_GET_ERR(str, req->output, model->out_qsize,= error); > + if (asprintf(&dump_path, "%s.q.%d", t->cmn.opt->filelist[= req->fid].output, Sent the wrong patch... I forgot to add the change (fixing with %u) when amending the commitlog. > + obj_idx) =3D=3D -1) > + return; > + ML_OPEN_WRITE_GET_ERR(dump_path, req->output, model->out_= qsize, error); > + free(dump_path); > if (error) > return; > --=20 David Marchand