X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Fhelper.h;fp=include%2Fhelper.h;h=9873feadd85b020556c1cd1e4f45925094b1fdd1;hb=171fcc6fd03e3f5787b3d0ee8aedc8cb9bcc6f17;hp=9d6617a8de044b2f1fa04481c9c1874cb8ffbcd2;hpb=1bf9a78810308942841c732f5e9b7530f0bb3ca0;p=lttng-ust.git diff --git a/include/helper.h b/include/helper.h index 9d6617a8..9873fead 100644 --- a/include/helper.h +++ b/include/helper.h @@ -43,4 +43,16 @@ void *zmalloc(size_t len) #define LTTNG_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) +/* + * Use of __builtin_return_address(0) sometimes seems to cause stack + * corruption on 32-bit PowerPC. Disable this feature on that + * architecture for now by always using the NULL value for the ip + * context. + */ +#if defined(__PPC__) && !defined(__PPC64__) +#define LTTNG_UST_CALLER_IP() NULL +#else /* #if defined(__PPC__) && !defined(__PPC64__) */ +#define LTTNG_UST_CALLER_IP() __builtin_return_address(0) +#endif /* #else #if defined(__PPC__) && !defined(__PPC64__) */ + #endif /* _LTTNG_UST_HELPER_H */