Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Dec 2016 04:32:29 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        markj@FreeBSD.org
Cc:        rm@joyent.com, freebsd-dtrace@freebsd.org, swills@FreeBSD.org
Subject:   Re: malformed symbol
Message-ID:  <20161220.043229.1880233551388576235.hrs@allbsd.org>
In-Reply-To: <20161219005342.GA57753@wkstn-mjohnston.west.isilon.com>
References:  <20161215.075124.1459885758696268380.hrs@allbsd.org> <6b0842f5-46e8-e90e-0cc6-ec0cbe74669a@joyent.com> <20161219005342.GA57753@wkstn-mjohnston.west.isilon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Tue_Dec_20_04_32_29_2016_317)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Mark Johnston <markj@FreeBSD.org> wrote
  in <20161219005342.GA57753@wkstn-mjohnston.west.isilon.com>:

ma> On Wed, Dec 14, 2016 at 02:56:12PM -0800, Robert Mustacchi wrote:
ma> > On 12/14/16 14:51 , Hiroki Sato wrote:
ma> > >  This was reproducible on 11.x and 12.x, not on 10.x.  Could anyone
ma> > >  try this and let me know if this is reproducible on your 11.x or 12.x
ma> > >  box?  I guess this is a regression of symbol rewrite routine such as
ma> > >  s/__/-/ in the dtrace utility while I have not investigated the
ma> > >  details yet.  Or am I missing something here?
ma> >
ma> > We've seen something similar on illumos that corresponds with newer
ma> > binutils versions (2.26). See https://www.illumos.org/issues/6653.
ma>
ma> I wrote a hacky patch[1] which modifies libdtrace such that it appends
ma> the modified symbol name to the strtab instead of modifying the original
ma> name, and updates the symbol to point to the new entry. It seems to
ma> address the issue.
ma>
ma> I then wondered why we update the strtab in the first place. The code
ma> uses the modified string to look up the probe corresponding to the
ma> relocation that designates the probe site. Why can't we copy the symbol
ma> name to a buffer, call strhyphenate() on that, and use it for the lookup
ma> instead? Once the probe sites are recorded in the DOF, we shouldn't care
ma> about the symbol name. I implemented this too[2] and haven't hit any
ma> problems with some quick testing.
ma>
ma> [1] https://people.freebsd.org/~markj/patches/libdtrace_symname_swizzle.diff
ma> [2] https://people.freebsd.org/~markj/patches/libdtrace_symname_swizzle2.diff

 Thank you.  I tried [2] and it worked well.  If it has no regression
 it looks better to me.

-- Hiroki

----Security_Multipart(Tue_Dec_20_04_32_29_2016_317)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEABECAAYFAlhYNc0ACgkQTyzT2CeTzy2pegCgr0+Tmi5z5WNm0i7zOdyfbKRb
x2QAnj+XlgoU2aSfZJKKixuLVo4et10F
=yL1w
-----END PGP SIGNATURE-----

----Security_Multipart(Tue_Dec_20_04_32_29_2016_317)----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161220.043229.1880233551388576235.hrs>