From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by sourceware.org (Postfix) with ESMTPS id 945BF386F806 for ; Tue, 12 May 2020 11:12:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 945BF386F806 Received: by mail-il1-x12f.google.com with SMTP id b71so4979167ilg.8 for ; Tue, 12 May 2020 04:12:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lqsOoo7qnaooJsVNBM2cV2pOTiBgf2KebscmfmZKVhw=; b=Hu8TwCFok0kQN1VO0JS/az47hywNAmseN7pnOiMuTJgyQv3Qm4yx8i+jlQscCkpy/8 pOkDbrSmCZNREeY7fbfvjVpalxI2q5sPoqw3NOhDH4KS//7mYBlTAp4pVgiRBqNJSevi UD7qz/770v+vNJ6INnJE5iULpxl11QmqgKT/mL7kxIqYhu9dV5S+a6K0UIR38yszO/U8 MMkiS68m3TEaya04rsvhq/8mFR2HHo1zUavUeF6alXj2m3/6aN2GVBa2TU02T/pyHQ7P t9lGbDlpnbB2H1XiYpZA6Ch4ixiw6jxVKB0OE70nBgTXHOs0CmUmzoF7dPpJOzdpy7JR C8fA== X-Gm-Message-State: AGi0PuZGsS9+feWBAxRUFIMw4aVFi5ahugyDSvKUly7qk3/DPIgwybuw 0D/ltME5nbFAlqbKvIFrg5AAzttNLTbITZG+U3s= X-Google-Smtp-Source: APiQypKlSrAIru9lt087xzQgqhP0Yc+fg98bKBWqoKv9nE+/20jDS6sxUpvSM3TlHLfMRuSTZy2AghJsp7TLRTdtoQM= X-Received: by 2002:a92:cf46:: with SMTP id c6mr8703357ilr.4.1589281927160; Tue, 12 May 2020 04:12:07 -0700 (PDT) MIME-Version: 1.0 References: <0bbdaab7-c083-e14e-6227-27713dab9657@users.sourceforge.net> <874ksmg3fb.fsf@oldenburg2.str.redhat.com> <929cc727-20c6-480c-3412-d3f7a08f7544@users.sourceforge.net> <1ca27c9f-235d-5e97-a506-e6267aeb81c6@redheads.de> <7ff5de622d68b00e195cb4bf176a729064cb4eb5.camel@op.pl> <87ftc5bjib.fsf@oldenburg2.str.redhat.com> In-Reply-To: From: Jonathan Wakely Date: Tue, 12 May 2020 12:11:56 +0100 Message-ID: Subject: Re: size of exception handling To: Freddie Chopin Cc: Florian Weimer , "gcc@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2020 11:12:08 -0000 On Tue, 12 May 2020 at 11:48, Freddie Chopin wrote: > To summarize. Current C++ exceptions have very huge, mostly "one-time" > kind, cost on the size, even if not used at all by the user, mosly due > to std::terminate() and all the string handling code inside it, as well > as the unwind tables. There is no string handling code in std::terminate: namespace std { typedef void (*terminate_handler) (); void terminate() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__noreturn__)); } void __cxxabiv1::__terminate (std::terminate_handler handler) throw () { __try { handler (); std::abort (); } __catch(...) { std::abort (); } } void std::terminate () throw() { __terminate (get_terminate ()); } Please clarify what you're talking about.