]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Segmentation fault in contrib/lua-lpeg/lpvm.c on ppc64el 3366/head
authorSpühler Stefan <git@tuxli.ch>
Tue, 12 May 2020 12:23:42 +0000 (14:23 +0200)
committerSpühler Stefan <git@tuxli.ch>
Tue, 12 May 2020 12:33:06 +0000 (14:33 +0200)
This disables a workaround only intended for aarch64 if the target
architecture is powerpc.

Issue: #3365

contrib/lua-lpeg/lptypes.h

index 46aac07a967a4a1eda769e7f3277af85c11fcf35..e69a9ed6bc8a0fccbd2e0f0c18ca2cf5cdf70f6d 100644 (file)
@@ -152,7 +152,7 @@ typedef struct Charset {
 #define testchar(st,c) (((int)(st)[((c) >> 3)] & (1 << ((c) & 7))))
 
 /* Special workaround for luajit */
-#if defined(WITH_LUAJIT) && !(defined(_X86_) || defined(__x86_64__) || defined(__i386__))
+#if defined(WITH_LUAJIT) && !(defined(_X86_) || defined(__x86_64__) || defined(__i386__) || defined(__powerpc__))
 # define LPEG_LUD_WORKAROUND 1
 void * lpeg_allocate_mem_low(size_t sz);
 void lpeg_free_mem_low(void *p);