From owner-svn-src-all@freebsd.org Sat Feb 13 18:47:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 096B5AA6AF0; Sat, 13 Feb 2016 18:47:27 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id C638D1E50; Sat, 13 Feb 2016 18:47:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c110-21-41-193.carlnfd1.nsw.optusnet.com.au (c110-21-41-193.carlnfd1.nsw.optusnet.com.au [110.21.41.193]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id DA1654238AC; Sun, 14 Feb 2016 05:47:21 +1100 (AEDT) Date: Sun, 14 Feb 2016 05:47:19 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r295561 - in head: include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/include In-Reply-To: <20160213172321.GE91220@kib.kiev.ua> Message-ID: <20160214050522.J1687@besplex.bde.org> References: <201602120738.u1C7cKpq093956@repo.freebsd.org> <20160212232717.P894@besplex.bde.org> <20160212143630.GS91220@kib.kiev.ua> <20160213021939.S1340@besplex.bde.org> <20160212173641.GV91220@kib.kiev.ua> <20160213070506.N2501@besplex.bde.org> <20160213101623.GZ91220@kib.kiev.ua> <20160214035852.D918@besplex.bde.org> <20160213172321.GE91220@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=R4L+YolX c=1 sm=1 tr=0 a=73JWPhLeruqQCjN69UNZtQ==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=0ieMqWJny2FzPIRSrysA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 18:47:27 -0000 On Sat, 13 Feb 2016, Konstantin Belousov wrote: > On Sun, Feb 14, 2016 at 04:02:05AM +1100, Bruce Evans wrote: >> The old visibility bugs with mc_* should be fixed someday. I said that >> uc_* could be used. _mc_* should have been used originally. Maybe we >> can just change to either of these, since nothing except libc should >> have used the internals of mcontext_t. > > mcontext_t is needed and used by many language runtimes which handle > exceptions for their functionality. It could be gc barriers, hacks with > tagging, and many more. API cannot be broken there by renaming the > structure members. But it is not part of the API. The API is specified to be opaque. getcontext(3) doesn't even document the visible parts of it. > The only way to hide mc_* is to rename them to __mc_* and provide compat > redefinitions when is included directly. This is > extremely cumbersome and I do not see a need in such fix for perceived > use case of pure ANSI C code which, to be broken, must #define mc_XXX > and then include . How likely is third party code to use undocumented internals of opqaue types when FreeBSD code mostly doesn't used them. I checked all files in /usr/src outside of /sys/ that contain "ucontext.h". There are 71 such files with 204 lines matching "mc_". The actual users of mcontext_t's internals are: contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc: 8 instances contrib/compiler-rt/lib/sanitizer_common/sanitizer_freebsd.h: 30 instances lib/libc: 102 instances lib/libthread_db: 60 instances tools/KSE/ksetest/kse_threads_test.c: 2 instances tools/KSE/rr/rr.c: 2 instances So there are 4 instances outside of libraries (counting compiler_rt as a libraries) and these 4 are to support KSE which went away about 11 years ago IIRC. tools/KSE doesn't compile now of course. The first error is that its asm source file is i386-only, so fails on i386. The next error is that its primary (?) API file no longer exists. I hoped to find no instances outside of libc. Bits in contrib are are problem. Bruce