Search tips

apple banana
Find rows that contain at least one of the two words.

+apple +juice
Find rows that contain both words.

+apple macintosh
Find rows that contain the word 'apple', but rank rows higher if they also contain 'macintosh'.

+apple -macintosh
Find rows that contain the word 'apple' but not 'macintosh'.

+apple ~macintosh
Find rows that contain the word 'apple', but if the row also contains the word 'macintosh', rate it lower than if row does not. This is "softer" than a search for '+apple -macintosh', for which the presence of 'macintosh' causes the row not to be returned at all.

+apple +(>turnover >strudel)
Find rows that contain the words 'apple' and 'turnover', or 'apple' and 'strudel' (in any order), but rank 'apple turnover' higher than 'apple strudel'.

Find rows that contain words such as 'apple', 'apples', 'applesauce', or 'applet'.

"some words"
Find rows that contain the exact phrase 'some words' (for example, rows that contain 'some words of wisdom' but not "some noise words").

By continuing to use this site you agree to the use of cookies. For more information and to find out how to change this click here. Accept Cookies
Please enable cookies in your browser for this website.
Advanced search

Test Harness Works with MinGW But Not with IAR

Last updated: 2019-10-02

Why does a test harness work with MinGW and crash with IAR?


VectorCAST does not ensure the test cases are run time safe with C/C++. The C/C++ data types do not give enough information to allow it to do that. Two examples are pointers to unconstrained arrays and casting between data types of different sizes.

The library function causing the discrepancy is malloc().

malloc() allocates memory without direct reference to the data type it is allocating for. If the function under test overruns the allocated memory, behavior is undefined and could be one of

  1. Test case succeeds. The overrun does not affect memory used for other purposes.
  2. Test case fails. The overrun affected memory used for other purposes.
  3. Test harness crashes. For example a segmentation violation occurs.

This can occur without involvement of VectorCAST. Stand alone erroneous code may run on one compiler but not on another. Compilers conform to the malloc() specification but implement it differently, which leads to undefined behaviour if misused.

VectorCAST is not a bounds checker. In classical unit testing, the code within the function-under-test should be compiled and executed as identically as possible to the production compilation and execution and therefore the test tool does not insert array bounds checking.

Article Options
Views: 184