From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2974FC44508 for ; Wed, 15 Jul 2026 13:05:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.linux.it; i=@lists.linux.it; q=dns/txt; s=picard; t=1784120721; h=to : date : message-id : in-reply-to : references : mime-version : subject : list-id : list-unsubscribe : list-archive : list-post : list-help : list-subscribe : from : reply-to : content-type : content-transfer-encoding : sender : from; bh=dYmx805rJfEEZAtAn/nJ+enUH7xEcV4E68IYAGH6pq4=; b=dqlKYoMHIrjepCUs6zBd2WKTSeie+YGjwLfIROysZ2zXOc2Xh3Ftu/gDmRKOpK7QPOr33 gqtK8mDOy5b2P6PsblzCa6TWn+7imwf/HReFtKKogvN9ud0rQyi4rVBnH4ifAsLcTgqwcRj YpyBha/ptf9gVBmswz7PNReHZxRUGs0= Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 929673E5690 for ; Wed, 15 Jul 2026 15:05:21 +0200 (CEST) Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id C56DA3C5717 for ; Wed, 15 Jul 2026 15:04:59 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 2C76260068B for ; Wed, 15 Jul 2026 15:04:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784120697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eSxtE6fkpnp0ysaDQUH79WuCrGTBdWEv/L8WwGydXKE=; b=VNsklt5JKQKfAkfERXASvwpphVoG4D3pdmU3njRSveze32VOe/MB1s/6ytFGdmoD0f/cDc 0qcekP/yp33xS9dVXd5bCRxJqUFhEWAQY70ofn72tCv0RxX8OhpipXRvhOkKM9LX0zXzzI 3o97FGAAy5bzEEP7wF5dFohxqkJ9b4Q= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-PGhJbkTnOgK6HSOrMV-UBw-1; Wed, 15 Jul 2026 09:04:56 -0400 X-MC-Unique: PGhJbkTnOgK6HSOrMV-UBw-1 X-Mimecast-MFC-AGG-ID: PGhJbkTnOgK6HSOrMV-UBw_1784120695 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 858EF1800665 for ; Wed, 15 Jul 2026 13:04:55 +0000 (UTC) Received: from tdzik-thinkpadt14gen6.tpbc.csb (unknown [10.43.3.29]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DF85641C for ; Wed, 15 Jul 2026 13:04:54 +0000 (UTC) To: ltp@lists.linux.it Date: Wed, 15 Jul 2026 15:04:45 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: WTohmF1iPMMOPUnGaVgMZWEf271JWGBEnMsd-R0bwDE_1784120695 X-Mimecast-Originator: redhat.com X-Virus-Scanned: clamav-milter 1.0.9 at in-5.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH 0/3] Fix to float_trigo core dump and related enhancements X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tomas Dzik via ltp Reply-To: Tomas Dzik Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-bounces+ltp=archiver.kernel.org@lists.linux.it Sender: "ltp" Hi all, following 3 patches fix a core dump we observed during testing. Because failed malloc() was contributing factor to it I added also some checks to malloc() return value. And since I was editing these files I spotted that they use sprintf() and I replaced it with snprintf() which is IMHO safer and can make debugging test failures easier. I would be grateful for review. Best regards, Tomas D. Tomas Dzik (3): LTP/Lite test float_trigo core dumps due to free(): invalid pointer Add some checks for malloc() returning NULL Replace sprintf() with more secure snprintf() variant in float tests testcases/misc/math/float/bessel/genbessel.c | 10 +++--- .../misc/math/float/exp_log/genexp_log.c | 24 ++++++++++---- testcases/misc/math/float/iperb/geniperb.c | 11 +++++-- testcases/misc/math/float/main.c | 18 +++++++--- testcases/misc/math/float/power/genpower.c | 21 ++++++++---- testcases/misc/math/float/thread_code.c | 33 +++++++++++++------ testcases/misc/math/float/trigo/gentrigo.c | 24 ++++++++++---- 7 files changed, 98 insertions(+), 43 deletions(-) -- 2.55.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp