Граф коммитов

5 Коммитов

Автор SHA1 Сообщение Дата
Sulekha Kulkarni f3af449e8b
Implicit include of checked header files (#440)
* Support for implicit and explicit inclusion of checked header files.

* Added comment header.

* Removed redundant blank lines.

* Fix to handle the presence of clang-specific declarations in header files plus
the fix to push/pop checked scopes.

* Modified header files to check for the __checkedc flag and added test cases.

* Some header files like threads.h, unistd.h, arpa/inet.h and sys/socket.h
may not be present in all compilation environments (Ex. Windows).
Therefore, the wrapper header files and the Checked C header files
should guard their inclusion using __has_include_next.
This will also cause changes in the expected output of some test cases.

* Incorporated review comments.

* The Checked-C-specific declarations in assert_checked.h, stdlib_checked.h
and inttypes_checked.h use the type wchar_t, whose definition is available
in stddef.h. The file inttypes_checked.h includes stddef.h but the other
two don't.
2021-04-01 07:08:01 -07:00
Michael Hicks 21fd12cf5c
Updates to checked headers for Apple compatibility (#427) 2020-11-12 16:35:27 -08:00
David Tarditi 82b7a3769f
Tests and changes for new #pragma CHECKED_SCOPE functionality. (#327)
There is new functionality for #pragma CHECKED_SCOPE:
 - Create _Bounds_only checked scopes.  The syntax is
  #pragma CHECKED_SCOPE _Bounds_only.
- Save/restore the checked scope state. The syntax is
  #pragma CHECKED_SCOPE push and #pragma CHECKED_SCOPE pop.
- Allow lower-case on/off directives for CHECKED_SCOPE.

Add tests and use the functionality to improve the checked include files
for the C standard library:
- Add tests for #pragma CHECKED_SCOPE _Bounds_only
- Add tests for #pragma CHECKED_SCOPE push and pop functinality.
- Update #include files to use new push and pop functionality so that
  they can robustly be included in either checked or unchecked scopes.
- Test that #include files can be included in checked scopes.
2018-10-09 18:24:46 -07:00
Anna Kornfeld Simpson ee4fe9ec39
Adds bounds-safe interface for __assert_fail on Linux (#310)
Adds to assert_checked.h a bounds-safe interface for __assert_fail
2018-08-28 13:43:24 -07:00
Anna Kornfeld Simpson 3fcdbbb800
Bounds-safe interface for assert (#299)
New header with bounds-safe interface for a function called by assert macros on both Windows and Linux.
2018-08-08 16:58:06 -07:00