From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from dsc-ffm-0866.mas.t-systems-service.com ([185.9.219.208]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ez4AT-0007jX-0h for ptxdist@pengutronix.de; Thu, 22 Mar 2018 18:38:25 +0100 Received: from smtp.thyssenkrupp.com ([149.211.153.214] helo=srv1732.hp.thyssenkrupp.com) by dsc-ffm-0866.mas.t-systems-service.com with esmtps (TLSv1:ECDHE-RSA-AES256-SHA:256) (envelope-from ) id 1ez4AR-0001xC-MN for ptxdist@pengutronix.de; Thu, 22 Mar 2018 18:38:23 +0100 Received: from localhost (localhost [127.0.0.1]) by srv1732.hp.thyssenkrupp.com (Postfix) with ESMTP id 3F8BF212B for ; Thu, 22 Mar 2018 18:38:23 +0100 (CET) Received: from mdcxch16.na.ops.local (tkeweb07.thyssenkruppelevator.com [66.194.145.38]) by srv1732.hp.thyssenkrupp.com (Postfix) with ESMTP id C53C12093 for ; Thu, 22 Mar 2018 18:38:22 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Thu, 22 Mar 2018 12:38:21 -0500 Message-ID: <2D79272AFFD75A4392ED2D3EF16D3B53A8943F@mdcxch20.na.ops.local> From: "Crim, Jason" Subject: [ptxdist] Including valgrind in the configuration doesn't trigger an un-optimized build of glibc. List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============0112911662==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de This is a multi-part message in MIME format. --===============0112911662== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01D3C204.92B0962C" This is a multi-part message in MIME format. ------_=_NextPart_001_01D3C204.92B0962C Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I'm currently using ptxdist 2015.10.0 and I've selected valgrind as a built-in option in the 'Debug Tools' using menuconfig. Valgrind is then installed in my image at /usr/bin/valgrind. However, it is currently not usable since the available glibc is too optimized, resulting in the following message. >=20 > valgrind: Fatal error at startup: a function redirection > valgrind: which is mandatory for this platform-tool combination > valgrind: cannot be set up. Details of the redirection are: > valgrind: =20 > valgrind: A must-be-redirected function > valgrind: whose name matches the pattern: strcmp > valgrind: in an object with soname matching: ld-linux-armhf.so.3 > valgrind: was not found whilst processing > valgrind: symbols from the object with soname: ld-linux-armhf.so.3 > valgrind: =20 > valgrind: Possible fixes: (1, short term): install glibc's debuginfo > valgrind: package on this machine. (2, longer term): ask the packagers > valgrind: for your Linux distribution to please in future ship a non- > valgrind: stripped ld.so (or whatever the dynamic linker .so is called) > valgrind: that exports the above-named function using the standard > valgrind: calling conventions for this platform. The package you need > valgrind: to install for fix (1) is called > valgrind: =20 > valgrind: On Debian, Ubuntu: libc6-dbg > valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo > valgrind: =20 > valgrind: Cannot continue -- exiting now. Sorry. =20 I've found a couple of references to the optimization being the culprit, such as https://sourceforge.net/p/valgrind/mailman/message/30887009/ >=20 > ... > Very probably these are due to calls on strlen() or memcpy() which have been > expanded inline because of aggressive optimization ("#include " > compiled with -O2 or -O3.) > ... =20 =20 Is there a method of configuring glibc to build un-optimized ( below -O2) for use with the valgrind tool? Can the valgrind selection automatically trigger this un-optimized build? Or, if there are other suggestions for addressing this issue, I'd like to hear them. =20 Thanks, - Jason Crim ------_=_NextPart_001_01D3C204.92B0962C Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I'm = currently using ptxdist 2015.10.0 and I've selected valgrind as a = built-in option in the 'Debug Tools' using menuconfig.  Valgrind is = then installed in my image at /usr/bin/valgrind.  However, it is = currently not usable since the available glibc is too optimized, = resulting in the following message.

> 

>        &nb= sp;    valgrind:  Fatal error at startup: a function = redirection

>        &nb= sp;    valgrind:  which is mandatory for this = platform-tool combination

>        &nb= sp;    valgrind:  cannot be set up.  Details of = the redirection are:

>        &nb= sp;    valgrind: 

>        &nb= sp;    valgrind:  A must-be-redirected = function

>        &nb= sp;    valgrind:  whose name matches the = pattern:      strcmp

>        &nb= sp;    valgrind:  in an object with soname = matching:   ld-linux-armhf.so.3

>        &nb= sp;    valgrind:  was not found whilst = processing

>        &nb= sp;    valgrind:  symbols from the object with = soname: ld-linux-armhf.so.3

>        &nb= sp;    valgrind: 

>        &nb= sp;    valgrind:  Possible fixes: (1, short term): = install glibc's debuginfo

>        &nb= sp;    valgrind:  package on this machine.  (2, = longer term): ask the packagers

>        &nb= sp;    valgrind:  for your Linux distribution to = please in future ship a non-

>        &nb= sp;    valgrind:  stripped ld.so (or whatever the = dynamic linker .so is called)

>        &nb= sp;    valgrind:  that exports the above-named = function using the standard

>        &nb= sp;    valgrind:  calling conventions for this = platform.  The package you need

>        &nb= sp;    valgrind:  to install for fix (1) is = called

>        &nb= sp;    valgrind: 

>        &nb= sp;    valgrind:    On Debian, = Ubuntu:           =       libc6-dbg

>        &nb= sp;    valgrind:    On SuSE, openSuSE, = Fedora, RHEL:   glibc-debuginfo

>        &nb= sp;    valgrind: 

>        &nb= sp;    valgrind:  Cannot continue -- exiting = now.  Sorry.

 

I've found a = couple of references to the optimization being the culprit, such as htt= ps://sourceforge.net/p/valgrind/mailman/message/30887009/<= /p>

> 

>        &nb= sp;    ...

>        &nb= sp;    Very probably these are due to calls on strlen() = or memcpy() which have been

>        &nb= sp;    expanded inline because of aggressive optimization = ("#include <string.h>"

>        &nb= sp;    compiled with -O2 or -O3.)

>        &nb= sp;    ...

 

 

Is there a = method of configuring glibc to build un-optimized ( below -O2) for use = with the valgrind tool?

Can the = valgrind selection automatically trigger this un-optimized = build?

Or, if there are other = suggestions for addressing this issue, I’d like to hear = them.

 

Thanks,

- Jason = Crim

------_=_NextPart_001_01D3C204.92B0962C-- --===============0112911662== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KcHR4ZGlzdCBt YWlsaW5nIGxpc3QKcHR4ZGlzdEBwZW5ndXRyb25peC5kZQ== --===============0112911662==--