Mentions légales du service

Skip to content
  • Fuad Tabba's avatar
    Fix parse error in presence of symbols named far · 42931ec9
    Fuad Tabba authored and LAWALL Julia's avatar LAWALL Julia committed
    
    
    There are quite a few variables named "far" in the kernel, e.g.,
    arch/arm64/kvm/inject_fault.c. Coccinelle has special treatment
    for "far" as being linkage related, which causes parse errors in
    their presence. I've grepped for "far" in the kernel tree, and
    haven't noticed where it's used like that, but I could have
    missed it.
    
    To reproduce:
    
    cat > test.c << EOF
    int main(void)
    {
            int far = 0;
            int x;
            x = 10;
            return x;
    }
    EOF
    
    cat > test.cocci << EOF
    @@
    identifier x;
    @@
    - x
    + y
    EOF
    
    spatch --sp-file test.cocci test.c --debug --verbose-parsing
    
    Signed-off-by: default avatarFuad Tabba <tabba@google.com>
    42931ec9