Bug 458287 - Crashes with scanf("%ds") (d means an integer)
Summary: Crashes with scanf("%ds") (d means an integer)
Status: REPORTED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 5.8.220401
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-25 08:42 UTC by ybx332
Modified: 2022-08-25 08:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ybx332 2022-08-25 08:42:25 UTC
SUMMARY
When using scanf like scanf("%10s"), the program will crash immediately.

STEPS TO REPRODUCE
1. Create a new project
2. Enter the code
3. Crash

OBSERVED RESULT
Crash

EXPECTED RESULT
Work normally

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.4

ADDITIONAL INFORMATION
May relate to clang, but I'm not sure.

libclang: crash detected during parsing: {
  'source_filename' : '/xxx/xxx/123.c' (contain the scanf code)
  'command_line_args' : ['clang', '-ferror-limit=100', '-fspell-checking', '', '-Wunused-parameter', '-Wunreachable-code', '-Wall', '-std=c99', '-nostdinc', '-xc', '-Wno-gnu-zero-variadic-macro-arguments', '-isystem/usr/local/include', '-isystem/usr/include/x86_64-linux-gnu', '-isystem/usr/include', '-isystem', '/usr/lib/llvm-14/lib/clang/14.0.6/include', '-imacros', '/tmp/kdevelop.vlVBSJ'],
  'unsaved_files' : [],
  'options' : 781,