On Wed, Jan 12, 2011 at 8:53 AM, David Woodhouse <dw...@infradead.org> wrote:
>
> On Tue, 2011-01-11 at 15:12 +0000, 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.
> [ ... ]
> >  /* Client-code macros to check the state of memory. */
> > @@ -176,24 +176,24 @@ typedef
> >     error message and returns the address of the first offending byte.
> >     Otherwise it returns zero. */
> >  #define VALGRIND_CHECK_MEM_IS_ADDRESSABLE(_qzz_addr,_qzz_len)    \
> > -   (__extension__({unsigned long _qzz_res;                       \
> > +   {unsigned long _qzz_res;                                      \
> >      VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                      \
> >                              VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE,\
> >                              _qzz_addr, _qzz_len, 0, 0, 0);       \
> >      _qzz_res;                                                    \
> > -   }))
> > +   }
> > [ ... ]

Hello Tony,

Did you realize that with that patch you have broken
VALGRIND_CHECK_MEM_IS_ADDRESSABLE() and several other macros ? The
above patch converts e.g. the following code into a syntax error:

void* addr;
int len;
int addressable;

addressable = VALGRIND_CHECK_MEM_IS_ADDRESSABLE(addr, len);

Bart.

------------------------------------------------------------------------------
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

Reply via email to