Dear Tuo Li,
Am 21.09.23 um 06:20 schrieb Tuo Li:
> I first preprocessed source code of the Linux 6.2, and then I used the
> following command to detect data races in the preprocessed source code:
>
> scripts/cpa.sh -lockator-linux linux_source/fs/crypto/fname.my.i
>
> but I got the following Error:
>
> Error: Parsing failed (lines 48893-48895: Initializer of global variable
> has side effect: struct kernfs_global_locks {
> struct mutex open_file_mutex[(1 << (2 * (( __builtin_constant_p(8192 < 32
> ? 8192 : 32) ? ((8192 < 32 ? 8192 : 32) < 2 ? 0 : 63 - __builtin_clzll(8192
> < 32 ? 8192 : 32)) : (sizeof(8192 < 32 ? 8192 : 32) <= 4) ?
> __ilog2_u32(8192 < 32 ? 8192 : 32) : __ilog2_u64(8192 < 32 ? 8192 : 32)
> ))))];
> };) (EclipseCParser.buildCFA, SEVERE)
>
> The file fname.my.i is attached in this email.
The problem here is that function calls inside initializers of global
variables are typically not allowed, and it just works here because the
compiler evaluates the function call during compilation.
So we have to add support for __builtin_clzll, __ilog2_u32, and
__ilog2_u64 as well to CPAchecker (the other functions should already work).
This should not be too difficult, but I cannot promise that we get to
implement it soon. Would you be interested in contributing this? I can
provide a pointer where to start.
Kind regards
Philipp
--
Philipp Wendler
Software and Computational Systems Lab
LMU Munich, Germany
Oettingenstr. 67 Raum F008 - Tel.: 089/2180-9181