Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B7C9F200A5B for ; Thu, 5 May 2016 07:33:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B67FD160A00; Thu, 5 May 2016 05:33:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 154A5160A01 for ; Thu, 5 May 2016 07:33:14 +0200 (CEST) Received: (qmail 97009 invoked by uid 500); 5 May 2016 05:33:13 -0000 Mailing-List: contact dev-help@arrow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@arrow.apache.org Delivered-To: mailing list dev@arrow.apache.org Received: (qmail 96972 invoked by uid 99); 5 May 2016 05:33:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2016 05:33:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 137DB2C1F6A for ; Thu, 5 May 2016 05:33:13 +0000 (UTC) Date: Thu, 5 May 2016 05:33:13 +0000 (UTC) From: "Micah Kornfield (JIRA)" To: dev@arrow.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ARROW-187) [C++] Decide on how pedantic we want to be about exceptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 05 May 2016 05:33:15 -0000 [ https://issues.apache.org/jira/browse/ARROW-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15271904#comment-15271904 ] Micah Kornfield commented on ARROW-187: --------------------------------------- I don't think the allocations are expensive generally (10s of bytes) but if we guarantee exception safety then we should avoid them. I say "should" because it seems very likely that if the allocations on these small amounts fail, something in the system would likely fail soon afterwards anyways. But at least it wouldn't be Arrow causing the segfault. I don't have much experience here either. Most of my C++ work has been done assuming exceptions. I was going to send out an e-mail to the mailing list to see if I could get more of a response. > [C++] Decide on how pedantic we want to be about exceptions > ----------------------------------------------------------- > > Key: ARROW-187 > URL: https://issues.apache.org/jira/browse/ARROW-187 > Project: Apache Arrow > Issue Type: Bug > Components: C++ > Reporter: Micah Kornfield > > We currently have code sprinkled around constructors that can technically fail because we either do a memcpy/allocation via vector copy constructor (we might be using a move constructor in places) and make_shared<>. > These are very small memory allocations but they can throw std::bad_alloc. > Technically, we would need to convert these to use Init or static factories. > (types.h is one place to look) -- This message was sent by Atlassian JIRA (v6.3.4#6332)