Message ID | 20240613185430.85352-6-nick.alcock@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <binutils-bounces+patchwork=sourceware.org@sourceware.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 F1AC6388216F for <patchwork@sourceware.org>; Thu, 13 Jun 2024 18:55:54 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 469D73882066 for <binutils@sourceware.org>; Thu, 13 Jun 2024 18:55:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 469D73882066 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 469D73882066 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1718304904; cv=pass; b=i5cHiV/1oX8WVkxqZPQhQH9onHKsj/DvNMl7G0ylq8rJK/BKfgvZrZkf3Ox7PBe3JHYo1cmY0wBFkWXVB9rDpxKeTCbQ5B3fX4dnUbDJQYSFDl0zJPZ8T/CVVYniXyPQcARJEe5QMtuz+eyz3b3EXOKKoxcX4R9RsBW8i9mvxig= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1718304904; c=relaxed/simple; bh=veRShiHHqcUndFMjMt6PJKit4rLnErJzWnoHntJNV60=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=jlY1N5gV6H8XxNFMSFYfjEoA9uMmE8KsRT4qjqr9T8pJ07tS+Fuf2E6e7+GZn/Tt9GQD0ygpcDgRum4ONzeF0Wm9+QS9ljnjWZ0WTUvBHhSSeENitn/S+NA2Pvpwk1AnUDJ3j9VMLiD7D8M2ZWcCEBelNsvTot+XStFIOlZaiEc= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45DEtTBM003182 for <binutils@sourceware.org>; Thu, 13 Jun 2024 18:55:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=IwqLVsXzBzfy4UGs6VPHrs/iqshnsw3rYhwCmQeugZE=; b= Nkcu+94tCY6OpuGKOoTpGEbyK8wYFSMvBMVIYlG5c1N8sIkxE4Loa6sZKEwA1MEQ 0l7gA7WEb8RfulCCW0uaIiMNc8pqz/GxVW499qkCPjedL/WBLDRYYr/Td6UJt9Ed aBaK4Zqfjcak1VZTJ4pjgms7HO/FywIBQ1HOj0w73ICIakqV731cZG3io9L5aoP8 lSZUKjnzo7+GL6ytBppG8DG+A9f4gt1K8f3Uv/7v9KA0SaVpx3Z2m/6IDkxxXHRN bAFkqQXfNDqgA1jfzeTBcWLmHgQtQ0NHzbls2zuzpW1yE7s1gvJNtJ3JEmCJrRZm KBzqh8XRGfzBsfORfMrEWA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ymhf1j8fp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Thu, 13 Jun 2024 18:55:02 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 45DIDSPO036618 for <binutils@sourceware.org>; Thu, 13 Jun 2024 18:55:00 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2172.outbound.protection.outlook.com [104.47.58.172]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ynce0ps53-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Thu, 13 Jun 2024 18:55:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T2VZRADskUkzGi51U9u/hQH1z//2tKeOtPx/tldr/fyuhu24YoaGbQgwLkzmJHCzzPQZuGqO6vi264idy2IDK7Vofeod09nwXN+qnGgY6qKKcVv2JriT5uCnewc2/NPOlr3aTXkpxy4YG69JWlk+8raNCkw7yiArDndwOTZTStTYxhxSe8n6ZevnDOtD0lhEKyZc4NzjxgLfq8LLNyKkYBnclvatvTAjQMbC76SnxK/Fw+s2pRN2+Q3A+AaiGvOLu36ag+Sd0AdAiC3S8ig8ebO5klWvwsOGwTPnZLM7Vg/8AdD7cQl16Lp9XVgE3jACS+GYkccVRiG9nccZ+iwZhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IwqLVsXzBzfy4UGs6VPHrs/iqshnsw3rYhwCmQeugZE=; b=H4kaXi/nL4MD6+0ppx4IbpRcruAfCCuxq5yrHjNkJufQRAxwcaPQ1s7WO1tmspBRDyY7KiyGfMKUSjaQkvlOZ8gudTwUjmpzKeoQxld0IFnoR+KaM2dKnY4p0gQZgUsBzLbhoph7CbyFwI5pLOSUjKvlEUfZSczE4CFX4Dn9YLaeAmG8Dfi7Zd7gq6YJnQf1iAhD8at9qKkNfwX/X2EcaAvx9wJopvX8ks5DvCJ/f8wYRubrdMnrA6EZf8vgpyGVsZWfU4c5T9jn/D1W8p9bxEMlaCYJfTBggCKQMi3S6Kr+61SJF3zdH9Z1AxTvCBB1TVFE67YGk47JSa/+C+36BQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IwqLVsXzBzfy4UGs6VPHrs/iqshnsw3rYhwCmQeugZE=; b=VJ13eEijmDNGZzlxz3KUGIeAfLCgDU+Z8d3+cc8MyEeV9n9MuTb3MuDw4rPlC0XSix6OOVjpHsTjdLMTIJ/ZMdcQn4JkwJOnj3B36vaqdY/yl0DrJryt6pCjmavsHOQ/n4FHrS6ZGfEfyQu47HJVxn3+vYMZM49n+xOPjnHyhSY= Received: from MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) by CO1PR10MB4451.namprd10.prod.outlook.com (2603:10b6:303:96::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.20; Thu, 13 Jun 2024 18:54:59 +0000 Received: from MW4PR10MB6608.namprd10.prod.outlook.com ([fe80::b53a:ccc1:c190:c5df]) by MW4PR10MB6608.namprd10.prod.outlook.com ([fe80::b53a:ccc1:c190:c5df%6]) with mapi id 15.20.7677.024; Thu, 13 Jun 2024 18:54:58 +0000 From: Nick Alcock <nick.alcock@oracle.com> To: binutils@sourceware.org Cc: stephen.brennan@oracle.com Subject: [PATCH 05/11] libctf: don't leak enums if ctf_add_type fails Date: Thu, 13 Jun 2024 19:54:24 +0100 Message-ID: <20240613185430.85352-6-nick.alcock@oracle.com> X-Mailer: git-send-email 2.45.1.275.g567cb0950c In-Reply-To: <20240613185430.85352-1-nick.alcock@oracle.com> References: <20240613185430.85352-1-nick.alcock@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO4P123CA0341.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18c::22) To MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR10MB6608:EE_|CO1PR10MB4451:EE_ X-MS-Office365-Filtering-Correlation-Id: dc92431b-a5c8-427a-018e-08dc8bda52c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230035|376009|1800799019|366011; X-Microsoft-Antispam-Message-Info: hH0s6MT6se1URFltBEI878YqD7YXoI7JA2u52jWF2tKbOldqIThSTiZmspgib/9SjZB5eqY2FYypJ3NBT8rMr/7DQwzjfJ1l8nfi2YGV0l69KN49lTdQOljF0fyly/TRiuiiv3DE90gpZ2KyaJUQhBnJw+j76sQNqI0XtnnyGyZE86ho+RrcCZlYgLlf214x04wkcW2lsGsMaoTojLQC2p90sqiT+CxGJxYboytSJp+qNo6qO4MVDyjON23KAwh3GdLZpKcFzadPE0N9QO1223TqGLZEXLX2SMfi7kAwWedmmNVk2OmVRF5PJnv/FAIQfGMcvIFqiWjmvBwa5SWMSavgkV2olZIiChnODaptTfXxwGNYKzaVrUsFfUGwkw58LYcl9CCHXSpF+GNda6LxZ/1ANLfIdQRGMMfRBb1O58QAF10oO7PEfh6CMRGQ4zBfkh5GmJJu97o/7sWN612c91T/QFoqGlRyYbYHItJPOvH2Xw2KqOmidsuP63KwNgIjAkAEygPAQr86bGorNxvanKztqkUyWQUQTqqmPKPxyGDD7SPGHMKDJQG773jtywnyUayEIEagYWnxjI1tLlBipcE1maWyH+4KkrpU6Q0bvJu6sN2TTWdzPlJquNVclFdkxWfeJVMFENcF7Rck0OKkZ951Irso0/CBa+8RbAsNhvJkzel5tfvlNjbHv43s/RS8vD9dzPuaKEYL47pE+icbo3LmREKdws2lnoXBcYhUZFE9hyEENUU2vcHTESWrL+VP0DSirXtPT8L4NhkmxUm9xjipp/dDt33AyZ2BNUyfs3c4NQ4KVJ/HKQTBiaseYQJvSM2bDLxHuajgq7Tjq287c6roooLUnr/MeUmGFMFyVqram+Uqz3mb0TmPNcSa415erGakaxb42SI9PXdUUQNT7bOKyGQcKZRBpkiCrVnQ7N6t7mufuxH/cfTqFkqQ2Kt7i2qTh+JBLua9jSktSvHr6faK161Wxj6zLruuvWFbPLJQ7+KsQCENdhRxx2rVyr3hiPhYPx2d3oH4Cq1qGutPVwHGF9EGhtVS5UuzeU/I3rgN6XQxqAS7RtAQMqcTLgbVdQ1a1ssge61lbLaRdIEHwK0VJWnXRKngruFw8wtiF8KX2pMOw3n05EQMxN+gy8wnlmfEZGyP4U5tfYTSqWye0WBuDyUIpMNmb3+5i2Yu8dF218XntdsMTNdkcSO31o+WhP5YqkXDsr7T2dpVsb5BM5HX/3A1NqsgP/2i9u4le4uoNyONWF6RtttHZVepwbCahv5zouS3ZV+Q9hL9A0jZO5+4/ACTeKN5yqDfgauTr8c= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR10MB6608.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230035)(376009)(1800799019)(366011); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6XXtAxadQoEEIt4l5MgEOER6kQrUH/xHQs30ITSam+hjgoltuqghzAh3U0nWKeSxP63Zs9+xMF0HIqDMB3weR+3omgLe6Q0Gl1nrFCbkqInsQXtTgvRyDU6RrliXmEScwb6qCDFq3+fNZHsnXFG2GKe21c57ibiPh3Wq6giN/sdSaPZChUnqDbKceppGLov+oiqTOF3nG3gbWvkEnV2gb/0Cez+7Nh9fjj1qBoBvelGC/GHpiEL29UfYomIEYQQamYgzlrgubsZlRuR8AdN29nw5ePFGChPl2nGcKTJ/7SHQrfPFVCW7oMQAtk043+D+5Uwwci/RdB1M7pY187JFcDtXgH1K/U0BC9YvD+URuxaAeVRl5uMYsKkkJUyIk1etQoDRpqWuV3TYQ1sHunW0+CSbEH6vIiCOprAuKFy4Bw0B0RNG+jERDMBvbbWNiFbPtNVGY45P97pO7thgtEQrtxVSrFIHU+IfRVtlZpas1E/TibaA+C9aU+S2iFYDyFVg0Z2xa1lrERF7RrUYVYvslWqMmywgBr5GIeJmZ0+4Xwc6rBZQXHktOn4QeYwESxyYtrgmoasAcw85HOIYJhVGrN/SQy3BIiopmWCysFDSq79TbRGNw0bQUAfj1Ugo60MV9xJuDKStjPmCrZrCG4avV4OFpK0XLwo9jnIpif9scu5MIj/JHoz47awLGwuJ1TAVhONFulksatlg5TIak38zuacb+N7wvsLpT2oLU0B43ATynt//2aIwz+Jz81utATuuYQ5hFwt9do8XISt9hF8urAS+hfxt1Ffx461cz4SMrjp6fNVdwZrzyXqSOoPtKk6mcCc8n1FH+BzGoB/Jf9yPfNcUG0B27PcrmBLSSdwZvP6sVHDM1K5v7K35USzfcksDWD2rkHoi2E2Gx2mOuEHEVUQxbNbdUHpPZeeBjOT/XEde34W7QdnogEf029RHZ1xsXBFgS6AOXZY4G9cFSBb55Z3m657z6iFub1uGiTFGwys+WOhnmsLWPuhZ1PriPyZf0OQyE72OCIOmuORWMdJ//jfF1zxW0XaUcdACNACntlubp0JDyFbkO0UOIPuK0EQlF/GcAnN2M9FIBY2ju77U01ij3KJGijcacPOgJ+eO5JgxPDKkazjorYljmd7ET9OvCjhC/mlWWt5iEchLqQE5qNn5mMzJsBOWwSyrfJCCc+MlV1s5mDzMsAijWD13MMCl7AoxJzLukB+TJdO8y0cuiSvmRvtCs2tP8RN96YSgZgOYOkdiHl/qMUrYu7vj6f2UrEb+QF/19baN/ZwLbPpzib0QbaOCNIk39yyjXSEvZwDEAXgNaBuC75eCPLepXL9RNm/D/bqh+cFzLPYt2yKQv876oUCanNEmofTTEhqN3YnZd9CIK2Iz9gvcuh0G3+ZBFPU82ECfFaFgPAFXJ8dwZMlXczSS4pF5qDhJHG/mFKnNB8b5BT+xm321JlBpV4MmbM0H6b8DjBQyCrJP904zw3yqLG3mLBj+s79gNU+CKCTs2PhzhNcGWojvDbLd6GvupkDmB7MFQYyBBhPef7emzG+7CIemVEhRd60g/SffLGCMa9nKaBwOQr8md6A5CYoZK4P3Ggv1PUf0RUrYeBCXkg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: Ok80BTp2Ti+rADg285qUFeKj1IKE8HScfI2qCPU3Su/2jwHbr+NimXm2J9PNYNdfzfvG7NHJsgILqFEeUODKLm/72yoed0vDn934wOP7IVUAr96ArmI7FKmYHZSqGxjsJ9xSOWFTqFiUO3VvWPY+4e2fHC4rMaVCbF4EaLdu1r3SvKbGfl4wdRtWWRYWX0N25X8e2g6yNp6ndZgycrEJQMohuheo6j4ctSWH7bcS9brjkUVG9mED0oX+swR1ZeOiMaPlnWNDKw1gyZAKczqGrPToeeCb91zSzoZ81bJC4ZaU7QuRXiowDaaaucdpczTrhfUMe0ke/XWOlH7W4qoAI+Qt1xaKWkM5E7DYXYDHkq6V2OeZjvzAgxjJ1kmdb1WJWuEs9Wy6S6Agx5DENKkgfKUPQq0sMObEB5RihmNOeVbBwkp8UGps5EhwHUJHg3o2zufWmMVN/UKtWWxqXp4SFnTI9NF3mZBlcJhcVReErptEYyEtQiyLZp4ZItotD0pxfqlpEYzChwdaBaFAUn8y+Rtx8eyRCwgr55kOuxXp1UQ+HC6XNNvleMhOlXQc+JpoMo6Ym10zmnGVP45VDWYNLdJV7qAwAKtXeXrYOasK4YQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc92431b-a5c8-427a-018e-08dc8bda52c0 X-MS-Exchange-CrossTenant-AuthSource: MW4PR10MB6608.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2024 18:54:58.9215 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aV6I/fcHFZEVbj4EEEdCOL1UtR+QuUXq2pN1IGX3kVSUjXDAb8EKWYGMixQ0eOz3h3S6eEA35LfhEqB70E08ww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4451 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-13_11,2024-06-13_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 adultscore=0 mlxscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406130134 X-Proofpoint-ORIG-GUID: kVZYRju95fbVRJMJUC5CEiLN162rSy0L X-Proofpoint-GUID: kVZYRju95fbVRJMJUC5CEiLN162rSy0L X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org |
Series |
enumerator query API, plus some bugfixes
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_binutils_build--master-arm | success | Build passed |
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | success | Build passed |
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 | success | Test passed |
linaro-tcwg-bot/tcwg_binutils_check--master-arm | success | Test passed |
Commit Message
Nick Alcock
June 13, 2024, 6:54 p.m. UTC
If ctf_add_type failed in the middle of enumerator addition, the destination would end up containing the source enum type and some but not all of its enumerator constants. Use snapshots to roll back the enum addition as a whole if this happens. Before now, it's been pretty unlikely, but in an upcoming commit we will ban addition of enumerators that already exist in a given dict, making failure of ctf_add_enumerator and thus of this part of ctf_add_type much more likely. libctf/ * ctf-create.c (ctf_add_type_internal): Roll back if enum or enumerator addition fails. --- libctf/ctf-create.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c index ee79e49794d..073006b24ea 100644 --- a/libctf/ctf-create.c +++ b/libctf/ctf-create.c @@ -1944,10 +1944,15 @@ ctf_add_type_internal (ctf_dict_t *dst_fp, ctf_dict_t *src_fp, ctf_id_t src_type } else { + ctf_snapshot_id_t snap = ctf_snapshot (dst_fp); + dst_type = ctf_add_enum (dst_fp, flag, name); if ((dst.ctb_type = dst_type) == CTF_ERR || ctf_enum_iter (src_fp, src_type, enumadd, &dst)) - return CTF_ERR; /* errno is set for us */ + { + ctf_rollback (dst_fp, snap); + return CTF_ERR; /* errno is set for us */ + } } break;