-
- Downloads
Merge branch 'feature/kostyantyn/c-updates' into 'master'
Improvements to the C runtime lirbary of E-ACSL This merge requests brings the updates to the E-ACSL memory model made during development of the segment-based shadow model + some recent changes and improvements. I understand that the change is rather massive and touches many aspects so maybe it would be worthwhile to have a brief meeting where I can give you more detailed explanations before you review the change. - Improvements to the localized implementation of `printf` (`e_acsl_printf.h`): * specifiers for printing memory addresses. * specifiers for printing bit-level representation of memory blocks. * `abort`/`assert` functionality moved to the `e_acsl_assert.h` header. - `e_acsl_assert.h` (new): * custom implementation of `assert` and `abort` functions. - `e_acsl_malloc.h` (new): * access to memory allocation functions. - `e_acsl_debug.h` (new): * C utilities for debugging. - `e_acsl_string.h` + `glibc` folder (new): * custom (GLIBC) implementations of `memset`, `memcpy`, `strlen`, `memmove`, `strcmp` and `strncmp`. See in-line documentation for further details. - `e_acsl_syscall.h` (new): * re-declarations of standard system call functions using direct application of `syscall`. See in-line documentation for further details. - External E-ACSL API (`e_acsl_mmodel.h`) moved one level up. - Directory `memory_model` renamed to `adt_models`. ADT stands for Abstract Data Type. - Changes to the E-ACSL public API: * removed `__out_of_bound` function unused * added `__e_acsl_memory_init` -- functionality relevant for initialization of a memory tracking state. * `__memory_size` variable used for tracking of allocated memory on the program's heap renamed to `__heap_size`. In addition renamed the `__get_memory_size` renamed to `__get_heap_size`. * function `__init_args` renamed to `__init_argv`. The change is because `__init_argv` is responsible only for tracking of strings captured by `argv` argument to the main function. * function `__literal_string` renamed to `__readonly`. * `e_acsl_assert` renamed to `__e_acsl_assert`. - Changes to ADT-based memory model (`adt_models/e_acsl_mmodel.c`): * fixed a bug in `realloc` that caused lookup failure if `realloc` relocates a memory block to a new address. * system-wide assertions, print statements and `string.h` functions (e.g., `memset`) replaced by custom implementations. * removed `__e_acsl_mmodel_memset` function in favour to the functionality provided by`e_acsl_string.h`. * removed definition of `__out_of_bound` (see changes to the public API). * reorganization of code of ADT-based models. In the current implementation each model is encapsulated using a single file with all private symbols restricted to its compilation model. Files: - `share/e-acsl/adt_models/e_acsl_bittree_mmodel.c` (patricia trie) - `share/e-acsl/adt_models/e_acsl_tree_mmodel.c` (binary tree) - `share/e-acsl/adt_models/e_acsl_splaytree_mmodel.c` (splay tree) - `share/e-acsl/adt_models/e_acsl_list_mmodel.c` (linked list) * fixed an issue that caused ADT models to always use 64-bit addresses * fixed a bug that caused calloc-allocated blocks appear as uninitialized data * fixed a bug leading to incorrect initialization of partially allocated blocks via `realloc` * fixed a bug leading to incorrect initialization test for partially allocated blocks * implemented a dynamic guard against compiling sources instrumented using different pointer size. - Changes to the instrumentation engine: * `__e_acsl_memory_init` renamed to `__e_acsl_globals_init` * calls to `__e_acsl_memory_init` (now provided by the public API) are added by instrumentation for all cases that require memory tracking. - Other changes: * changes to `e-acsl-gcc.sh`, `Makefile.in` and test oracles to accommodate the above. * added tests for \initialized and \offset predicates See merge request !31
No related branches found
No related tags found
Showing
- src/plugins/e-acsl/.gitignore 1 addition, 0 deletionssrc/plugins/e-acsl/.gitignore
- src/plugins/e-acsl/INSTALL 24 additions, 8 deletionssrc/plugins/e-acsl/INSTALL
- src/plugins/e-acsl/Makefile.in 6 additions, 5 deletionssrc/plugins/e-acsl/Makefile.in
- src/plugins/e-acsl/doc/Changelog 3 additions, 0 deletionssrc/plugins/e-acsl/doc/Changelog
- src/plugins/e-acsl/gcc.sh 0 additions, 10 deletionssrc/plugins/e-acsl/gcc.sh
- src/plugins/e-acsl/gcc_bts.sh 0 additions, 3 deletionssrc/plugins/e-acsl/gcc_bts.sh
- src/plugins/e-acsl/gcc_runtime.sh 0 additions, 3 deletionssrc/plugins/e-acsl/gcc_runtime.sh
- src/plugins/e-acsl/gcc_test.sh 0 additions, 18 deletionssrc/plugins/e-acsl/gcc_test.sh
- src/plugins/e-acsl/man/e-acsl-gcc.sh.1 4 additions, 6 deletionssrc/plugins/e-acsl/man/e-acsl-gcc.sh.1
- src/plugins/e-acsl/misc.ml 4 additions, 6 deletionssrc/plugins/e-acsl/misc.ml
- src/plugins/e-acsl/misc.mli 1 addition, 1 deletionsrc/plugins/e-acsl/misc.mli
- src/plugins/e-acsl/scripts/e-acsl-gcc.sh 58 additions, 22 deletionssrc/plugins/e-acsl/scripts/e-acsl-gcc.sh
- src/plugins/e-acsl/share/e-acsl/bittree_model/e_acsl_adt_api.h 10 additions, 23 deletions...lugins/e-acsl/share/e-acsl/bittree_model/e_acsl_adt_api.h
- src/plugins/e-acsl/share/e-acsl/bittree_model/e_acsl_adt_mmodel.h 210 additions, 185 deletions...ins/e-acsl/share/e-acsl/bittree_model/e_acsl_adt_mmodel.h
- src/plugins/e-acsl/share/e-acsl/bittree_model/e_acsl_bittree.h 51 additions, 49 deletions...lugins/e-acsl/share/e-acsl/bittree_model/e_acsl_bittree.h
- src/plugins/e-acsl/share/e-acsl/bittree_model/e_acsl_bittree_mmodel.c 5 additions, 8 deletions...e-acsl/share/e-acsl/bittree_model/e_acsl_bittree_mmodel.c
- src/plugins/e-acsl/share/e-acsl/e_acsl.h 5 additions, 5 deletionssrc/plugins/e-acsl/share/e-acsl/e_acsl.h
- src/plugins/e-acsl/share/e-acsl/e_acsl_assert.h 100 additions, 0 deletionssrc/plugins/e-acsl/share/e-acsl/e_acsl_assert.h
- src/plugins/e-acsl/share/e-acsl/e_acsl_bits.h 101 additions, 0 deletionssrc/plugins/e-acsl/share/e-acsl/e_acsl_bits.h
- src/plugins/e-acsl/share/e-acsl/e_acsl_debug.h 99 additions, 0 deletionssrc/plugins/e-acsl/share/e-acsl/e_acsl_debug.h
Loading
Please register or sign in to comment