From patchwork Sun Dec 23 21:35:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 154447 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3270127ljp; Sun, 23 Dec 2018 13:36:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN4Skb4hkOekzpncyJ7+0sKwb0/rvNx+gUcdnNh33zCLUBbi1KZhP3v7AJ3nVxNdNXIK0pGh X-Received: by 2002:a63:f552:: with SMTP id e18mr10371813pgk.239.1545600994786; Sun, 23 Dec 2018 13:36:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545600994; cv=none; d=google.com; s=arc-20160816; b=RFloh2D2WCcdsQiwLxF8s/5v8ft7a56riwPmlLJ+nqnWbuHYabOnwRLe/tvuy90KVy g7Dwb4sxoZ4iM83ZQR4bHmqQRV8cLQVzJle/ttHnmzVRfsHla7qeLbEEohRly6fGNSzt vVkrwHEEUE4/zHK+/L9Vt4R/8m2fDacCb31Uv/KqJkpOLsKdy2JnZZ3Th0HP6PkIj/Vn x3f5nDwuyfnR6EOVyee59aqTAhAQOZiqVcSaWk+08PwthC5Xc+yBgu0pAOcJDhU7+1oR TUWSZaECohTrcz2+Fxf+v+X3eI9DL02743/RbGQv9m2Dn0sLQhmAQao8FXreL22hYnwN szzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=uggsU246FXBOhUYy0UAupvMl0rHV2IPyHXUEh8Ts1Yk=; b=tUZPde6t05+Xfz2RgsawscRscM+D835G5STqkGxYH7SvzsMLerAKBNGyHXMrxIPCxa cdB7OaCOGs7WGDdcdyEKdgUEgTzxIdy3y+Rue4pILJGi9OQ0dSpD66xlZfU8ZAajYqlZ UMZeYxjpE4eLGt8Vl458RG4SIu+r/oMwVC23WnTDI/qvSVb5ZEMss++1WHzacjeTZU7v dEk7+L8au4Z2xhNsZPTl26/d/RMUi45ewfy7Wv2kLaozRmEL9NLabXe00xrfoDX63KV/ yDKrdHKPLDQGeuHtWVhaVEL005Gbij+6Nt16rf1wLVQjIGfYzt6rUY9m3nkNPUWZMXNk tkQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=uhOcY+MI; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id j65si4836641pge.444.2018.12.23.13.36.34; Sun, 23 Dec 2018 13:36:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=uhOcY+MI; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 508446D4C2; Sun, 23 Dec 2018 21:36:31 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by mail.openembedded.org (Postfix) with ESMTP id 8A6DC6D2BF for ; Sun, 23 Dec 2018 21:36:10 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id g9so4868290plo.3 for ; Sun, 23 Dec 2018 13:36:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xOLWlMoG2f5DHRBSttLol/Sl6nhYoGV3VorSlLadr54=; b=uhOcY+MItKZJInwF5BcKClvIsbQqAbaBZzow5kNxB7w48Pqg9qxZ2il9PugiOTxrWQ NCYe95QMvXPodsvq25E/O+VQ/E5Q20RQjn4PL/jkqzU/E60MZGIyEm11FvFPeOLQT2gg ABv6rP0muZZtcrxrKCZfZSKnmBQ+dbvTeLK6k8FvJn5fin3EIqD5WAqBCdARM1EEHros Y1nTxg6QMEmU6udUAaiaNXFrCYBb5/RWAfCwFef5pFrSdWU70YIPHbMc7bgb6szf+2sv lRw2RBtaOhr/NNPM4dVn4sOjzgI8d9FJwWGUr8Vqi81pAfqbM+BeZv1PczJkGuNGn1YX /K5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xOLWlMoG2f5DHRBSttLol/Sl6nhYoGV3VorSlLadr54=; b=FwQMcJpwMpbA+MYDwoo5trtMQO897BPJwv9WY76Fh5fBlUmapO4t7Paqhg+B5TfSoa yDS4hefPRWnMszIyJX4ZrlENKGiZPivMDHdDZFKJaUuPepXXb4iVzVcACXbz2hI5n9Lw +h+junLf3xwme0RfQPWFUG86wR/WmICVbtU/+lIFTuAYZ64YacRwCAIseSSfLcPQ/oiD VYDHKvdzunmuS1r9G3nFaGs5sROmsaLGYIsBCePjv0TDQmsmgTbPWx+39EurLxNw84Ip luy/RPdzDZh3yj+N3UytVR2MPRgNhdxYjBQOVRYPWm8Jr0ZyTsd/xVrJ+PhH7tRBgyFL zQYg== X-Gm-Message-State: AJcUukdXV6i+biSqr/kHdzsdqc2xsEITask3Lf/CUu+mgNoUGX21LNnd flSkb0/nIk5BmZ4mkW+1IGprXPqHkR8= X-Received: by 2002:a17:902:583:: with SMTP id f3mr11123432plf.202.1545600971192; Sun, 23 Dec 2018 13:36:11 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:877f:9499::19ec]) by smtp.gmail.com with ESMTPSA id m9sm33340800pgd.32.2018.12.23.13.36.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Dec 2018 13:36:10 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Sun, 23 Dec 2018 13:35:42 -0800 Message-Id: <20181223213557.7834-3-raj.khem@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181223213557.7834-1-raj.khem@gmail.com> References: <20181223213557.7834-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [oe] [meta-oe][PATCH 03/18] ltrace: Fix a NULL string use X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org This case is likely to happen when mod == NULL so print it when we are computing modname and symname Signed-off-by: Khem Raj --- ...o-same-block-where-modname-and-symna.patch | 37 +++++++++++++++++++ meta-oe/recipes-devtools/ltrace/ltrace_git.bb | 1 + 2 files changed, 38 insertions(+) create mode 100644 meta-oe/recipes-devtools/ltrace/ltrace/0001-move-fprintf-into-same-block-where-modname-and-symna.patch -- 2.20.1 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-move-fprintf-into-same-block-where-modname-and-symna.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-move-fprintf-into-same-block-where-modname-and-symna.patch new file mode 100644 index 0000000000..54acaace1a --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-move-fprintf-into-same-block-where-modname-and-symna.patch @@ -0,0 +1,37 @@ +From 0cad025f80cf090dc16a5b70e21477f5b08a67fd Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 20 Dec 2018 11:27:45 -0800 +Subject: [PATCH] move fprintf into same block where modname and symname are + computed + +In its current state if mod turns out to be NULL then modname and +symname will also turn out to be NULL and fprinting them as strings will +be problematic + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + output.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/output.c b/output.c +index b63befe..5aada7b 100644 +--- a/output.c ++++ b/output.c +@@ -654,12 +654,11 @@ frame_callback (Dwfl_Frame *state, void *arg) + NULL, NULL, NULL); + symname = dwfl_module_addrinfo(mod, pc, &off, &sym, + NULL, NULL, NULL); ++ /* This mimics the output produced by libunwind below. */ ++ fprintf(options.output, " > %s(%s+0x%" PRIx64 ") [%" PRIx64 "]\n", ++ modname, symname, off, pc); + } + +- /* This mimics the output produced by libunwind below. */ +- fprintf(options.output, " > %s(%s+0x%" PRIx64 ") [%" PRIx64 "]\n", +- modname, symname, off, pc); +- + /* See if we can extract the source line too and print it on + the next line if we can find it. */ + if (mod != NULL) { diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb index f4033f7c27..83043cd212 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb +++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb @@ -25,6 +25,7 @@ SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http file://0001-Add-support-for-mips64-n32-n64.patch \ file://0001-configure-Recognise-linux-musl-as-a-host-OS.patch \ file://0001-mips-plt.c-Delete-include-error.h.patch \ + file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \ " S = "${WORKDIR}/git"