bugGNU Octave - Bugs: bug #56862, [octave forge] (interval) UB in...

 
 

bug #56862: [octave forge] (interval) UB in crlibm found by cppcheck

Submitted by:  None
Submitted on:  Fri 06 Sep 2019 07:27:09 AM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  None Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  other
Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 06 Sep 2019 07:27:09 AM UTC, original submission:  

libcrm as found in octave-interval 3.2.0 has various unitialized variables, out-of-bounds dereference, and other issues. These were found by cppcheck, a linter and static analysis tool for C and C++.

However, upstream [1] doesn't have a bugtracker, and the last bugfix is from 2011, so is this the right place to report?

src/crlibm/log1p.c:424:7: error: Uninitialized variable: E [uninitvar]
src/crlibm/log1p.c:712:7: error: Uninitialized variable: E [uninitvar]
src/crlibm/log1p.c:999:7: error: Uninitialized variable: E [uninitvar]
src/crlibm/log1p.c:1286:7: error: Uninitialized variable: E [uninitvar]
E is only initialized in "else" branches.

src/crlibm/scs_lib/addition_scs.c:108:19: style: Array index 'k' is used before limits check. [arrayIndexThenCheck]
src/crlibm/scs_lib/addition_scs.c:493:18: style: Array index 'i' is used before limits check. [arrayIndexThenCheck]
src/crlibm/scs_lib/addition_scs.c:542:16: style: Array index 'i' is used before limits check. [arrayIndexThenCheck]
Dereferencing an array past the last item is undefined behavior.

There are other warnings, e.g. "Shifting a negative value is technically undefined behaviour", but I didn't check them.

[1]: https://gforge.inria.fr/scm/browser.php?group_id=5929&extra=crlibm

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only project members can vote.

 

 

 

No changes have been made to this item

Back to the top


Powered by Savane 3.5