Skip to content
Snippets Groups Projects
  1. Dec 10, 2015
    • Julien Signoles's avatar
      [tests] fix oracle wrt RTE changes · 78f0fe93
      Julien Signoles authored
      78f0fe93
    • Julien Signoles's avatar
      Merge branch 'kostyantyn/bugfix/global-initialisers' into 'master' · b47a2a93
      Julien Signoles authored
      Kostyantyn/bugfix/global initialisers
      
      This is the fix for the issue `0001817`: `Literal strings in global arrays with compound initializers are not correctly initialized`. The change is as we have discussed during our meeting on the 7th of December. The gist of the fix as follows:
      
      - Initialisers of all global variables are kept (instead of being removed), so as the code used for initialisations within the body of the `__e_acsl_memory_init`. 
      - Literal strings used in initialisations are recorded via special global variables. 
      
      The fix relies on the fact that a compiler will maintain only a single instance of a literal string, so recording a literal string once will cover all its uses. 
      
      For example, strings pointed to by some global variables `A` and `B`:
      
      ```
      ...
      const char *A = "X";
      const char *B = "X";
      ...
      ```
      
      will be captured by:
      
      ```
      ...
      __e_acsl_literal_string = "X";
      __store_block((void *)__e_acsl_literal_string,sizeof("X"));
      __full_init((void *)__e_acsl_literal_string);
      __literal_string((void *)__e_acsl_literal_string);
      ...
      ```
      
      There are some test failures, as some code generation has changed. I have intentionally left them in for the fist time so you can see the tests that fail. If this patch is accepted I am happy to fix the test suite and add a couple of new tests to cover the issue. I have also attached a file with some examples of global initialisers for different cases which you may find useful.
      
      [compound_initialiser.c](https://git.frama-c.com/frama-c/e-acsl/uploads/3599d1cbca9c790d6dd231d052ccf2f0/compound_initialiser.c)
      
      
      See merge request !18
      b47a2a93
    • Kostyantyn Vorobyov's avatar
      d63bd270
    • Kostyantyn Vorobyov's avatar
  2. Dec 09, 2015
  3. Dec 08, 2015
  4. Dec 07, 2015
  5. Dec 04, 2015
  6. Nov 06, 2015
  7. Oct 29, 2015
  8. Oct 21, 2015
  9. Oct 01, 2015
  10. Aug 31, 2015
  11. Aug 26, 2015
  12. Aug 25, 2015
  13. Jul 26, 2015
  14. Jun 30, 2015
  15. Jun 24, 2015
Loading