Smatch (Semantic Matching Tool) development
 help / color / mirror / Atom feed
* Build problem smatch 1.75
@ 2026-05-04  7:55 Harshit Mogalapalli
  2026-05-04  8:20 ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Harshit Mogalapalli @ 2026-05-04  7:55 UTC (permalink / raw)
  To: smatch

Hi Dan,

Build error:

pre-process.c: In function ‘parse_expansion’:
pre-process.c:1648:16: error: variable-sized object may not be initialized
  1648 |         struct arg_state args[slots] = {};
       |                ^~~~~~~~~
pre-process.c: In function ‘find_include’:
pre-process.c:1015:56: warning: ‘%s’ directive output may be truncated 
writing up to 255 bytes into a region of size between 1 and 4096 
[-Wformat-truncation=]
  1015 |                         snprintf(buf, sizeof(buf), "%s/%s", 
cwd, entry->d_name);
       |                                                        ^~
pre-process.c:1015:25: note: ‘snprintf’ output between 2 and 4352 bytes 
into a destination of size 4097
  1015 |                         snprintf(buf, sizeof(buf), "%s/%s", 
cwd, entry->d_name);
       | 
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


I think the problem is introduced by:

Fixes: 1a9a98e3c7b8 ("__VA_OPT__: parsing")

I think we need a memset() in parse_expansion()

thanks,
Harshit

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-05 14:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04  7:55 Build problem smatch 1.75 Harshit Mogalapalli
2026-05-04  8:20 ` Dan Carpenter
2026-05-04 10:47   ` Harshit Mogalapalli
2026-05-05 10:41     ` Dan Carpenter
2026-05-05 14:58       ` Harshit Mogalapalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox