X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Fhelper.h;h=9873feadd85b020556c1cd1e4f45925094b1fdd1;hb=1de7abffafd64c964b738926f1072f5704e8e51f;hp=9d6617a8de044b2f1fa04481c9c1874cb8ffbcd2;hpb=aa418aa26f842c1328337d5917f8ec67a3a8957f;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 */