Re: [Valgrind-users] Run native code?
But similarly to the previous comment of Tom, your application code you would integrate and link in valgrind tool code will need to ensure all writes are properly recorded. So, it looks the same kind of work to do it in your own code, or do it inside valgrind. So, if your often called function is relatively simple, and you know which write operations it is doing, you might just have a piece of code (in your application) which first tells what is being written by the function (using the client request to make a piece of memory defined), and then use the client request VALGRIND_NON_SIMD_CALLx to call the code on the native cpu. This can only (reasonably) be done if the function is quite heavy in cpu, but does not do a (lot) of writes which needs to be tracked. Philippe -Original Message- From: Oliver Schneider [mailto:oli...@f-prot.com] Sent: Friday 7 January 2011 16:03 To: valgrind-users@lists.sourceforge.net Subject: Re: [Valgrind-users] Run native code? Hi, thanks for your advice. I'll see whether I can manage to implement that. Nice trick :) // Oliver This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy. Any views expressed in this message are those of the sender. -- Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
Re: [Valgrind-users] installation error
As Julian mentioned, a workaround is to disable Valgrind's MPI wrapper support. An alternative to --with-mpicc=/some/path/that/does/not/exist is --without-mpicc. That said, this is actually a minor bug in MPICH2 that I'm surprised hasn't cropped up until now. I just fixed this on the MPICH2 trunk: https://trac.mcs.anl.gov/projects/mpich2/changeset/7686 So if you need to use Valgrind's MPI support for some reason, you'll need to upgrade your MPICH2 installation to tonight's nightly build or patch your version manually instead of passing --without-mpicc. Contact me off-list if you need more information about this. -Dave On Jan 11, 2011, at 12:04 PM CST, Julian Seward wrote: Try adding --with-mpicc=/some/path/that/does/not/exist to your ./configure flags. J On Thursday, January 06, 2011, Ataollah Mesgarnejad wrote: Dear All, I'm trying to compile Valgrind 3.6 on Mac os x 10.6 . Configure generates following as build archs and targets: Maximum build arch: amd64 Primary build arch: amd64 Secondary build arch: x86 Build OS: darwin Primary build target: AMD64_DARWIN Secondary build target: X86_DARWIN Default supp files: exp-ptrcheck.supp xfree-3.supp xfree-4.supp darwin10-drd.supp darwin10.supp Compile goes fine until the linker generates the following error: ld: duplicate symbol _MPIR_async_thread_initialized in /usr/local/lib/libmpich.a(init.o) and /usr/local/lib/libpmpich.a(_init.o) any help would be appreciated. Best, Ata M. --- --- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users -- Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users -- Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
Re: [Valgrind-users] [exim-dev] [Bug 1050] [PATCH] Portability fixes for memcheck.h.
On Tue, 2011-01-11 at 15:12 +, Tony Finch wrote: Exim doesn't compile with Sun or HP CC since Valgrind support was added. Although valgrind.h protects against usage on unsupported platforms, memcheck.h uses the __extension__() macro without checking. Remove all uses since VALGRIND_DO_CLIENT_REQUEST() has all the necessary portability support. --- Chris and Steen, Could you please try this patch and see if it fixes the compilation problems with 4.73? Thanks. This wants to go to Valgrind upstream too. Tony. -- f...@exim.org d...@dotat.at http://dotat.at/ ${sg{\N${sg{\ N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\ \N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}} src/src/memcheck.h | 48 1 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/src/memcheck.h b/src/src/memcheck.h index fc50dab..d159c22 100644 --- a/src/src/memcheck.h +++ b/src/src/memcheck.h @@ -107,66 +107,66 @@ typedef /* Mark memory at _qzz_addr as unaddressable for _qzz_len bytes. */ #define VALGRIND_MAKE_MEM_NOACCESS(_qzz_addr,_qzz_len) \ - (__extension__({unsigned long _qzz_res; \ + {unsigned long _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* default return */, \ VG_USERREQ__MAKE_MEM_NOACCESS, \ _qzz_addr, _qzz_len, 0, 0, 0); \ _qzz_res;\ - })) - + } + /* Similarly, mark memory at _qzz_addr as addressable but undefined for _qzz_len bytes. */ #define VALGRIND_MAKE_MEM_UNDEFINED(_qzz_addr,_qzz_len) \ - (__extension__({unsigned long _qzz_res; \ + {unsigned long _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* default return */, \ VG_USERREQ__MAKE_MEM_UNDEFINED, \ _qzz_addr, _qzz_len, 0, 0, 0); \ _qzz_res;\ - })) + } /* Similarly, mark memory at _qzz_addr as addressable and defined for _qzz_len bytes. */ #define VALGRIND_MAKE_MEM_DEFINED(_qzz_addr,_qzz_len)\ - (__extension__({unsigned long _qzz_res; \ + {unsigned long _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* default return */, \ VG_USERREQ__MAKE_MEM_DEFINED,\ _qzz_addr, _qzz_len, 0, 0, 0); \ _qzz_res;\ - })) + } /* Similar to VALGRIND_MAKE_MEM_DEFINED except that addressability is not altered: bytes which are addressable are marked as defined, but those which are not addressable are left unchanged. */ #define VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(_qzz_addr,_qzz_len) \ - (__extension__({unsigned long _qzz_res; \ + {unsigned long _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* default return */, \ VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE, \ _qzz_addr, _qzz_len, 0, 0, 0); \ _qzz_res;\ - })) + } /* Create a block-description handle. The description is an ascii string which is included in any messages pertaining to addresses within the specified memory range. Has no other effect on the properties of the memory range. */ -#define VALGRIND_CREATE_BLOCK(_qzz_addr,_qzz_len, _qzz_desc) \ - (__extension__({unsigned long _qzz_res; \ +#define VALGRIND_CREATE_BLOCK(_qzz_addr,_qzz_len, _qzz_desc) \ + {unsigned long _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* default return */, \ VG_USERREQ__CREATE_BLOCK,\ _qzz_addr, _qzz_len, _qzz_desc, \ 0, 0); \ -_qzz_res; \ - })) +_qzz_res;\ + } /* Discard a block-description-handle. Returns 1 for an invalid handle, 0 for a valid handle. */ #define VALGRIND_DISCARD(_qzz_blkindex) \ - (__extension__ ({unsigned long _qzz_res; \ + {unsigned long _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* default return */, \ VG_USERREQ__DISCARD, \ 0, _qzz_blkindex, 0,