220 12370 <4696439.EtcWScoEnF@tjmaciei-mobl4> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Crypto-hash obfuscated namespaces
Date: Wed, 20 Aug 2014 08:38:03 -0500
Lines: 52
Approved: news@gmane.org
Message-ID: <4696439.EtcWScoEnF@tjmaciei-mobl4>
References: <E01CC02F-FFDD-4F21-B477-DC84DA92DF7B@gmail.com> <1982042.YnJ2Uhn0rL@tjmaciei-mobl4> <43CE2885-EE77-4A34-BB85-585BF30AB9AF@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1408541939 24175 80.91.229.3 (20 Aug 2014 13:38:59 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 20 Aug 2014 13:38:59 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBYOJ2KPQKGQEB2XDPHY@isocpp.org Wed Aug 20 15:38:55 2014
Return-path: <std-proposals+bncBCB4TK757YBRBYOJ2KPQKGQEB2XDPHY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-we0-f199.google.com ([74.125.82.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBYOJ2KPQKGQEB2XDPHY@isocpp.org>)
	id 1XK666-0008HE-Ne
	for gclcip-std-proposals@m.gmane.org; Wed, 20 Aug 2014 15:38:42 +0200
Original-Received: by mail-we0-f199.google.com with SMTP id p10sf4943483wes.2
        for <gclcip-std-proposals@m.gmane.org>; Wed, 20 Aug 2014 06:38:42 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:subject:date:message-id:user-agent
         :in-reply-to:references:mime-version:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=umaILfvCS0ScLvbwKNNJfeYD4b6NmlgMYrOrHNYkNCc=;
        b=BNtZ1a6PRifIcHOvfn2OFu1vUqfg+Nq+XR2l/j9zsPTaZDgaDnDh1/Jy6pUMIwsBh6
         9DOW9MyD0wpxi+KXDDYkoHuikpwa2r3oqx1Ls3vK2C10PKI2DN9txZAtINJkP9isNoZ6
         8CzGw39fl+4JAgMYLp8x9Oed0rjjMz/mq9+WiwlUs2rGSPPO8VeMHR3ZbYaBrP9gXIXq
         Ddsn5MYtUumhleAiO5vtiFkvFn5TmDvmY82pjxMV8xA+RpXoti3EjqdPi9hC5Q4Fi5oT
         ejwLAQP7Ppg/M+RoOrFgjin3QrB+l6uCqCmQ+tUhaRziD9A4FVbbosm5pJhJp4+LVlOa
         tjjg==
X-Gm-Message-State: ALoCoQkkfBDFByAFVXYWfyXXp2R0a+eEtzBklEM0X4LJ9WIjjuciLoku45KYpSsBz+LAtOgXJPF9
X-Received: by 10.194.2.130 with SMTP id 2mr290603wju.5.1408541922387;
        Wed, 20 Aug 2014 06:38:42 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.183.233 with SMTP id ep9ls62562lac.62.gmail; Wed, 20 Aug
 2014 06:38:40 -0700 (PDT)
X-Received: by 10.152.179.168 with SMTP id dh8mr42944976lac.0.1408541920790;
        Wed, 20 Aug 2014 06:38:40 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id ui10si34220962lbc.100.2014.08.20.06.38.40
        for <std-proposals@isocpp.org>;
        Wed, 20 Aug 2014 06:38:40 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl4.localnet (jfdmzpr06-ext.jf.intel.com [134.134.137.75])
	by gondolin.macieira.info (Postfix) with ESMTPSA id B1B7412C00A
	for <std-proposals@isocpp.org>; Wed, 20 Aug 2014 06:38:39 -0700 (PDT)
User-Agent: KMail/4.14 beta2 (Linux/3.11.10-17-desktop; KDE/4.13.90; x86_64; ; )
In-Reply-To: <43CE2885-EE77-4A34-BB85-585BF30AB9AF@gmail.com>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 as permitted sender) smtp.mail=thiago@macieira.org
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:12370
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/12370>

On Wednesday 20 August 2014 18:01:14 David Krauss wrote:
> On 2014-08-20, at 3:27 PM, Thiago Macieira <thiago@macieira.org> wrote:
> > This doesn't look like it needs to be standardised at all. The standard
> > doesn't require that typeinfo carry a readable name. It's only required to
> > be unique per type (the portable C++ ABI carries the mangled name).
> 
> The standard also requires no attributes on namespaces.
> 
> I already mentioned that the attribute could otherwise be a conforming
> extension.
> 
> Actually, to be thorough, it's the mangled name that should be replaced with
> a hash. Object and function names still get exposed by shared libraries.
> This wouldn't work well on implementations that require shared library
> exports to be specified as a list of mangled names, but that's poor QOI
> anyway.
> On 2014-08-20, at 4:57 PM, Andrew Tomazos <andrewtomazos@gmail.com> wrote:
> > The name isn't required to be unique per type.  An implementation may
> > return the empty string for all types for example, provided this behavior
> > was documented.  (See 18.7.1 [type.info])
> Perhaps, but an implementation providing for hashes of user-specified length
> could allow the length to be zero and then emit empty strings. I suppose it
> depends on how the RTTI implementation uses the strings, for example for
> type_info::before. If it really can tolerate absence of string data, then
> that would be an optimal solution.
> 
> Anything besides the common ABI is a no-go without some way to opt in. On
> second thought, extern "C++ obfuscated" would also do the trick, but I
> think attributes are preferable.

External names are not part of the C++ standard. So let's forget everything 
about symbols here.

I think the only thing we can take out of your proposal here is that 
attributes should be allowed on namespaces.

Everything else is going to be compiler- and ABI-specific.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
