public inbox for cocci@systeme.lip6.fr
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: cocci@inria.fr
Subject: [cocci] How to improve the software according to stack overflows?
Date: Sun, 29 Jun 2025 10:19:01 +0200	[thread overview]
Message-ID: <fd69d396-7dbb-4d57-ae4b-666e30825cee@web.de> (raw)

Hello,

I converted source code from a known function definition like cec_is_switch()
to another script for the semantic patch language.
https://elixir.bootlin.com/linux/v6.16-rc3/source/include/uapi/linux/cec.h#L1189-L1199


@special_display@
identifier las;
@@
*las -> num_log_addrs == 1 && las -> log_addr [ 0 ] == CEC_LOG_ADDR_UNREGISTERED && las -> primary_device_type [ 0 ] == CEC_OP_PRIM_DEVTYPE_SWITCH && ! ( las -> flags & CEC_LOG_ADDRS_FL_CDC_ONLY )


I observed questionable behaviour (with the software combination “Coccinelle 1.3.0”).
https://github.com/coccinelle/coccinelle/issues/30#issuecomment-3015721749

Markus_Elfring@Sonne:…/Projekte/Linux/next-analyses> time /usr/bin/spatch --parse-cocci ../show_cec_is_switch.cocci
…
Fatal error: exception Stack overflow

real    0m3,852s
user    0m3,742s
sys     0m0,108s



I omitted the forth conjunction element from the shown expression for another
software test.

Markus_Elfring@Sonne:…/Projekte/Linux/next-analyses> time /usr/bin/spatch --parse-cocci ../show_cec_is_switch-reduced1.cocci | grep '^|' | wc -l
…
255

real    0m0,150s
user    0m0,133s
sys     0m0,028s


How will development considerations evolve then?

Regards,
Markus

                 reply	other threads:[~2025-06-29  8:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fd69d396-7dbb-4d57-ae4b-666e30825cee@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox