Menu

Infinite loop with Gnulib's intprops module

Daiki Ueno
2023-01-10
2023-01-10
  • Daiki Ueno

    Daiki Ueno - 2023-01-10

    Hello,

    Gnulib provides some handy intprops for overflow-checked integer arithmetic, which seem to be causing infloop when checked with cppcheck. I haven't managed to create a minimal reproducer, but you could replicate it with:

    $ cppcheck --version
    Cppcheck 2.9
    $ git clone --depth=1 https://git.sv.gnu.org/git/gnulib.git
    $ cd gnulib
    $ ./gnulib-tool --create-testdir --dir t intprops
    $ cd t
    $ ./configure
    $ time cppcheck --force -q -Igllib -Igltests -I. --error-exitcode=1 gltests/test-intprops.c -j2
    ... never stop ...
    

    (PS: I sent an account creation request for the Trac some time ago, but haven't received a reply; so trying on this forum)

     

    Last edit: Daiki Ueno 2023-01-10
  • CHR

    CHR - 2023-01-10

    I can reproduce the hang in createSymbolDatabaseExprIds() with test-intprops.c and intprops.h.
    It seems to be related to https://trac.cppcheck.net/ticket/10192

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.