This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Author Dr. Martin Ettl | |
| // Date 2014-08-09 | |
| // ------------------------------------------------------------------------------------------------- | |
| // | |
| // ./flint9 -v | |
| // FlexeLint for C/C++ (Linux) Vers. 9.00k3, Copyright Gimpel Software 1985-2013 | |
| // FlexeLint was compiled with gcc and enabled address-sanitizer and undefined behavior santizier: | |
| // gcc --sanitze=address --sanitze=undefined *.c -o flint9 | |
| // This file is able to crash the application. | |
| // Call it with the following parameters: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Here is the valgrind output. It states that there is something wrong with FlexeLint. Take a look at the line (==8590== Invalid read of size 4): | |
| _ | |
| const Token *expr1 = cond1->astOperand1(); | |
| /home/martin/cppcheck/lib/checkassignif.cpp 267 Error 40: Undeclared | |
| identifier 'cond1' | |
| /home/martin/cppcheck/lib/checkassignif.cpp 267 Error 10: Expecting a | |
| structure or union | |
| /home/martin/cppcheck/lib/checkassignif.cpp 267 Error 1013: Symbol | |
| 'astOperand1' not a member of class '' | |
| /home/martin/cppcheck/lib/checkassignif.cpp 267 Error 118: Too few arguments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ------------------------------------------------------------------ | |
| /// Generate and print the sequence A217574 to a std::string. | |
| /// Weblink: http://oeis.org/A217574 | |
| // | |
| // Usage: | |
| // ------ | |
| // unsigned int uiMax(25); | |
| // std::cout << strPrint_A217574(200)) << std::endl; | |
| // | |
| // Output: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| // ------------------------------------------------------------------ | |
| /// Generate and print the sequence A216983 to a std::string. | |
| /// Weblink: http://oeis.org/A216983 | |
| // | |
| // Usage: | |
| // ------ | |
| // unsigned int uiMax(88); | |
| // std::cout << PrintSequnce_A216983(uiMax)) << std::endl; |
NewerOlder