You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Kevin A. McGrail" <km...@apache.org> on 2023/02/10 14:51:57 UTC

Re: [External] warnings with sa-compile?

Does this still occur after a change I made yesterday?  I had a regex 
that some versions of perl handle and others didn't.

Regards,

KAM

On 2/10/2023 12:10 AM, Dan Mahoney (Gushi) wrote:
> RAPTOR REMARK: Alert! Please be careful! This email is from an 
> EXTERNAL sender. Be aware of impersonation and credential theft.
>
> Hey there all.
>
> We're only using two real rulesets: core and kam.cf
>
> Our nightly sa-update/sa-compile run is throwing warnings like the 
> following.  So, these are only warnings, and the compile continues, 
> but they're making my cron jobs noisy.
>
> The questions:
>
> 1) Are these known issues.
>
> 2) Is it worth filing a bug?
>
> OS is FreeBSD 12.4, and I think these are using the on-box c compiler 
> (clang), not gcc.
>
> -Dan
>
> cc -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H 
> -DUSE_THREAD_SAFE_LOCALE -fno-strict-aliasing -pipe 
> -fstack-protector-strong -I/usr/local/include -O2 -pipe 
> -fstack-protector-strong -fno-strict-aliasing -DVERSION=\"1.0\" 
> -DXS_VERSION=\"1.0\" -DPIC -fPIC 
> "-I/usr/local/lib/perl5/5.32/mach/CORE"   body_0.c
> In file included from body_0.xs:2:
> In file included from /usr/local/lib/perl5/5.32/mach/CORE/perl.h:3921:
> In file included from /usr/local/lib/perl5/5.32/mach/CORE/hv.h:663:
> In file included from /usr/local/lib/perl5/5.32/mach/CORE/hv_func.h:35:
> In file included from 
> /usr/local/lib/perl5/5.32/mach/CORE/sbox32_hash.h:4:
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:150:5: warning: 
> '(' and '{' tokens introducing statement expression appear in 
> different macro expansion contexts [-Wcompound-token-split-by-macro]
>    ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:80:38: note: 
> expanded from macro 'ZAPHOD32_SCRAMBLE32'
> #define ZAPHOD32_SCRAMBLE32(v,prime) STMT_START {  \
>                                     ^~~~~~~~~~
> /usr/local/lib/perl5/5.32/mach/CORE/perl.h:666:29: note: expanded from 
> macro 'STMT_START'
> #   define STMT_START   (void)( /* gcc supports "({ STATEMENTS; })" */
>                              ^
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:150:5: note: '{' 
> token is here
>    ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:80:49: note: 
> expanded from macro 'ZAPHOD32_SCRAMBLE32'
> #define ZAPHOD32_SCRAMBLE32(v,prime) STMT_START {  \
>                                                ^
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:150:5: warning: 
> '}' and ')' tokens terminating statement expression appear in 
> different macro expansion contexts [-Wcompound-token-split-by-macro]
>    ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:87:41: note: 
> expanded from macro 'ZAPHOD32_SCRAMBLE32'
>    v ^= (v>>23);                       \
>                                        ^
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:150:5: note: ')' 
> token is here
>    ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:88:3: note: 
> expanded from macro 'ZAPHOD32_SCRAMBLE32'
> } STMT_END
>  ^~~~~~~~
> /usr/local/lib/perl5/5.32/mach/CORE/perl.h:667:21: note: expanded from 
> macro 'STMT_END'
> #   define STMT_END     )
>                        ^
>
>
>
-- 
Kevin A. McGrail
KMcGrail@Apache.org

Member, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171


Re: [sa-list] [External] warnings with sa-compile?

Posted by Bill Cole <sa...@billmail.scconsult.com>.
On 2023-02-11 at 09:31:53 UTC-0500 (Sat, 11 Feb 2023 06:31:53 -0800 
(PST))
Dan Mahoney (Gushi) <da...@prime.gushi.org>
is rumored to have said:

> On Fri, 10 Feb 2023, Kevin A. McGrail wrote:
>
>> Does this still occur after a change I made yesterday?  I had a 
>> regex that some versions of perl handle and others didn't.
>
> Still ongoing as of a few minutes ago.  If you want full output, let 
> me know.
>
> If there's a way to force sa-compile to use gcc or something, that 
> would also be useful to know.

Not sure if this is a purely historical point, but for a long while it 
was necessary to compile any compiled addons to Perl with the same 
compiler that built the main Perl executable. I'm not sure how operative 
that is with modern Perl on modern OSs, but it has caused substantial 
angst in the MacPorts community fairly recently because prebuilt 
binaries and the most common user toolchains on some platforms weren't 
consistent.

My point being: if you manage to get sa-compile to use gcc instead of 
clang and not generate those weird warnings, you need to be sure that 
what you get out of it actually works with your Perl.

Or, particularly with 4.0, you could skip precompiling the rules 
altogether. I don't believe that it still provides enough performance 
savings to be worth doing on a modern system without memory pressure.

-- 
Bill Cole
bill@scconsult.com or billcole@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire

Re: [sa-list] Re: [External] warnings with sa-compile?

Posted by "Dan Mahoney (Gushi)" <da...@prime.gushi.org>.
On Fri, 10 Feb 2023, Kevin A. McGrail wrote:

> Does this still occur after a change I made yesterday?  I had a regex that 
> some versions of perl handle and others didn't.

Still ongoing as of a few minutes ago.  If you want full output, let me 
know.

If there's a way to force sa-compile to use gcc or something, that would 
also be useful to know.

-Dan

-- 

--------Dan Mahoney--------
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
FB:  fb.com/DanielMahoneyIV
LI:   linkedin.com/in/gushi
Site:  http://www.gushi.org
---------------------------