Re: [Valgrind-users] memcheck question

2016-08-30 Thread Mark Roberts
; From: Julian Seward [mailto:jsew...@acm.org] > Sent: Tuesday, August 30, 2016 1:59 PM > To: Mark Roberts; 'Philippe Waroquiers' > Cc: valgrind-users@lists.sourceforge.net > Subject: Re: [Valgrind-users] memcheck question > > > I don't think that is_valid_for

Re: [Valgrind-users] memcheck question

2016-08-30 Thread Julian Seward
I don't think that is_valid_for_valgrind should really be required. That delimits areas which Valgrind itself can use but the client isn't allowed to access. In what way is is_valid_for_client too strict? J -- ___

Re: [Valgrind-users] memcheck question

2016-08-30 Thread Philippe Waroquiers
On Tue, 2016-08-30 at 10:02 -0700, Mark Roberts wrote: > Ok - I was wrong. The problem is that is_valid_for_client is too strict. > And or'ing that with > is_valid_for_valgrind is too loose. In the end, by trial and error, I came > with a test that seems to work for Daikon. > > First, I che

Re: [Valgrind-users] memcheck question

2016-08-30 Thread Mark Roberts
ppe Waroquiers' > Cc: 'valgrind-users@lists.sourceforge.net' > Subject: RE: [Valgrind-users] memcheck question > > Thank you, that is a big help. I do have a follow up question. When a > Valgrind client allocates memory that will be used as a shadow copy of the > user

Re: [Valgrind-users] memcheck question

2016-08-30 Thread Mark Roberts
, 2016 1:52 PM > To: Mark Roberts > Cc: valgrind-users@lists.sourceforge.net > Subject: Re: [Valgrind-users] memcheck question > > > Checking the protection can be done with VG_(am_is_valid_for_client). > This check is implemented by the address space manager, that maintai

Re: [Valgrind-users] memcheck question

2016-08-29 Thread Philippe Waroquiers
On Mon, 2016-08-29 at 07:28 -0700, Mark Roberts wrote: > The C/C++ front end to our tool Daikon includes most of Valgrind’s > memcheck code. We monitor the execution of a user’s program and > record the values seen for various program variables. As we follow > pointer variables, we need to make s

Re: [Valgrind-users] memcheck question

2016-08-29 Thread John Reiser
> We are using “is_mem_defined” (in mc_main.) to test for “is it safe to read > this location?” and that does not appear to be quite right. It looks as > though an address in a code segment is defined, but not readable. We get a > SIGSEGV with a bad permissions message when we try. Whether or

[Valgrind-users] memcheck question

2016-08-29 Thread Mark Roberts
The C/C++ front end to our tool Daikon includes most of Valgrind's memcheck code. We monitor the execution of a user's program and record the values seen for various program variables. As we follow pointer variables, we need to make sure they point to valid memory before we attempt to read the co