Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 76F79C433F5 for ; Sun, 6 Feb 2022 18:43:14 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.88,348,1635199200"; d="scan'208";a="19950115" Received: from prod-listesu18.inria.fr (HELO sympa.inria.fr) ([128.93.162.160]) by mail2-relais-roc.national.inria.fr with ESMTP; 06 Feb 2022 19:43:12 +0100 Received: by sympa.inria.fr (Postfix, from userid 20132) id 566FEE0380; Sun, 6 Feb 2022 19:43:12 +0100 (CET) Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 73CACE037F for ; Sun, 6 Feb 2022 19:43:11 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.88,348,1635199200"; d="scan'208";a="5153849" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2022 19:43:11 +0100 Date: Sun, 6 Feb 2022 19:43:10 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Denis Efremov cc: cocci@inria.fr In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [cocci] spatch 1.1.1 segmentation fault report Reply-To: Julia Lawall X-Loop: cocci@inria.fr X-Sequence: 124 Errors-To: cocci-owner@inria.fr Precedence: list Precedence: bulk Sender: cocci-request@inria.fr X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Sun, 6 Feb 2022, Denis Efremov wrote: > Hi, > > I'm observing a weird crash with spatch 1.1.1 > > $ spatch --version > spatch version 1.1.1 compiled with OCaml version 4.11.2 > Flags passed to the configure script: --enable-opt --enable-ocaml --enable-python --enable-pcre-syntax --enable-pcre --prefix /home/work/.opam/4.11.2 --libdir /home/work/.opam/4.11.2/lib > OCaml scripting support: yes > Python scripting support: yes > Syntax of regular expressions: PCRE > > $ cat segfault.cocci > @err@ > position p; > @@ > > amd_energy_is_visible(...) > { > * return 0444;@p > } > > @script:python@ > p << err.p; > @@ > > coccilib.report.print_report(p[0], "found") > > $ mkdir empty_dir # creating empty directory > $ spatch segfault.cocci empty_dir > init_defs_builtins: /home/work/.opam/4.11.2/lib/coccinelle/standard.h > 0 files match > [1] 152475 segmentation fault (core dumped) spatch segfault.cocci test I tried 1.1.1 with the options --enable-opt --enable-ocaml --enable-python --enable-pcre-syntax --enable-pcre, but it seems to work find for me. Does the problem go away if there is a file in the directory? If you remove the python code? julia > > > Best Regards, > Denis Efremov >