heads-up: systemtap-sdt-devel rebase in rawhide

Jakub Jelinek jakub at redhat.com
Wed Jan 19 22:15:36 UTC 2011


On Wed, Jan 19, 2011 at 04:49:04PM -0500, Frank Ch. Eigler wrote:
> 
> tgl wrote:
> 
> > [...]  I think the only near-term fix is to turn off dtrace support
> > in mysql.  [...]
> 
> We'll do one better; we'll add a hack to sys/sdt.h to make mysql build
> and respin systemtap today or tomorrow.
> 
> > But the real issue here is that systemtap has got to be more chary of
> > what they expose into application namespace, or this same scenario is
> > going to be played out again and again.
> 
> I agree.  It's not a great situation, but local GCC/C++ experts have
> found no better way to type-analyze the parameters, to ensure their
> safe passage to the tool.  (Our testing shows <limits> is not
> offensive to other C++ apps we've seen.)

If you really want to avoid #include <limits> in sys/sdt.h, you can, e.g. by using

template<typename __sdt_T>
struct __sdt_type
{
  static const bool __sdt_signed = false;
};
  
#define __SDT_ALWAYS_SIGNED(T) \
template<> struct __sdt_type<T> { static const bool __sdt_signed = true; };
#define __SDT_COND_SIGNED(T) \
template<> struct __sdt_type<T> { static const bool __sdt_signed = ((T)(-1) < 0); };
__SDT_ALWAYS_SIGNED(signed char)
__SDT_ALWAYS_SIGNED(short)      
__SDT_ALWAYS_SIGNED(int)
__SDT_ALWAYS_SIGNED(long)
__SDT_ALWAYS_SIGNED(long long)
__SDT_COND_SIGNED(char)  
__SDT_COND_SIGNED(wchar_t)
#if defined (__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
__SDT_COND_SIGNED(char16_t)
__SDT_COND_SIGNED(char32_t)
#endif

	Jakub


More information about the devel mailing list