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

514 Коммитов

Автор SHA1 Сообщение Дата
David Tarditi 46fb634018
Remove use of stdcheckedc.h from some tests. (#505)
Apple has made some changes to the header files for malloc and
related functions to use variables with the name ptr. This conflicts
with the macro in stdcheckedc.h defining ptr as _Ptr.  Remove the
uses of stdcheckedc.h in files that fail on MacOS.
2024-09-23 22:41:48 -07:00
David Tarditi 8321e58d19
Update URLs and move the history section later in the README.md file. (#502) 2024-09-01 22:32:55 -07:00
David Tarditi 8b0d5f7511
Update README.md
- Add compiler release information.
- Add build status.
- Improve the introduction part.
- Update the publications list.
2024-08-21 23:40:37 -07:00
David Tarditi ee166f7a54
Merge pull request #485 from checkedc/fork
Microsoft transferred ownership of the Checked C repo to the Checked C GitHub organization this week.  Merge our fork of Checked C back into the original Checked C repo.

To support the repo transfer, we moved our fork to https://github.com/checkedc/checkedc-fork. This brings in all the changes in from that repo.
2024-08-21 23:09:59 -07:00
David Tarditi 466798b21d Remove Microosft-specific security reporting file. 2024-08-21 22:46:00 -07:00
David Tarditi 41344bee86 Merge remote-tracking branch 'origin/master' 2024-08-21 22:41:52 -07:00
David Tarditi 936ad214d7 Declare Version 1.0 of the Checked C spec. 2023-11-07 22:27:52 -08:00
arun 84ae80fafd add a flag to only add typematic changes, or only checked-c or both 2023-11-06 22:35:32 -05:00
David Tarditi 3ea0294f3e
Update Checked C specification to match the compiler implementation part 1 (#501)
The Checked C specification does not match the compiler implementation.   This is the first part of bringing the specification into alignment with the compiler implementation.  It addresses
- Move planned features to a new section in the specification.
- Remove speculative features from the specification.
- Move the description of static checking of bounds declarations to the end of the specification.
It also moves the related work section and the reject design to appendices.  They don't need to be in the specification and typically would be considered auxiliary material for any programming languages standard document.
2023-07-18 23:08:23 -07:00
David Tarditi 9544bafa10
Fix Checked C tests on Mac OS (#502)
This change updates the Checked C tests so that they run properly on Apple ARM64 hardware running a recent version of MacOS. The changes consist of:

- Using SIGTRAP signal handlers catch runtime checking failures instead of SIGILL.
- Only run Linux-specific header file tests on Linux.
- Add a bounds-safe interface specific to MacOS so that errno work properly in a checked scope.

Testing:
check-checkedc passes on Windows x86 and MacOS 13.4.1
2023-07-18 22:57:44 -07:00
David Tarditi a37445f262
Update README.md
Remove some stray mentions of SSDP.
2023-07-07 17:25:00 -07:00
David Tarditi 3c8b3fc4cd
Update README.md
Update GitHub release from secure-sw-dev to checkedc.
2023-07-07 17:24:14 -07:00
David Tarditi 7affd420bb
Add University of Washington PLSE working lightning talk. (#482)
Add slides from lightning talk at 2023 University of Washington Programming Languages and Software Engineering (PLSE) workshop.
2023-05-23 21:15:57 -07:00
David Tarditi 1010962068
Move presentations directory to top-level. (#481) 2023-05-23 21:08:13 -07:00
Arunkumar Bhattar 44b52ca721
Checked C macro test cases.
The Checked C compiler now supports an alternate syntax and macros for backward compatibility.  The technical details of the syntax and macros are documented at https://github.com/secure-sw-dev/checkedc/wiki/Proposed-extension-changes-to-improve-backward-compatibility.

This change modifies some of the tests in existing files to use the new syntax.  It only modifies a small fraction of the tests because of the syntactic nature of the changes.  This avoids duplicating test files, making it easier to modify tests later.
2023-05-06 12:40:58 -07:00
David Tarditi 24a60e59df
Merge pull request #479 from secure-sw-dev/3c-headers-update
This includes header files changes that Correct Computation made in porting existing C code to Checked C using their 3C tool. The 3C repo is at https://github.com/correctcomputation/checkedc. This includes a few changes to header files to fix tests that fail on Windows.

I'm doing a squash merge so that we include history from several years of changes by 3C to header files as they ported code.

Testing:
- Built for x64 for Windows and Linux.
- Passes Checked C and clang testing for x64 for Windows and Linux.
2022-11-30 14:56:24 -08:00
David Tarditi 93642c7331 Fix typo in signal_checked.h 2022-11-30 07:22:33 -08:00
David Tarditi 7121a0c5ff Adjust a few header files for Windows 2022-11-29 21:52:11 -08:00
David Tarditi 9c50960b94 Some minor potential fixes. 2022-11-29 20:52:15 -08:00
microsoft-github-policy-service[bot] a0461e8d74
Microsoft mandatory file (#481)
Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
2022-09-01 11:45:45 -07:00
David Tarditi d5fc02c43a Merge branch 'master' of https://github.com/correctcomputation/checkedc into 3c-headers-update 2022-01-31 10:07:06 -08:00
David Tarditi fc99671fdf
Additional updates to README.md (#477) 2022-01-17 22:27:41 -08:00
David Tarditi 5eca3f518c
Update README.md and add code of conduct. (#476) 2022-01-17 21:41:54 -08:00
Matt McCutchen (Correct Computation) 36a89b3722 Install all checked headers as part of the `checkedc-headers` target.
The subdirectories were assigned to the `clang-headers` target, which
made no sense.
2022-01-07 14:27:27 -05:00
Matt McCutchen (Correct Computation) 559e455b6e Fix broken reference from gettimeofday to `struct timezone` when
__USE_MISC is off.

(Seen in the ptrdist ft benchmark.)
2022-01-05 10:15:52 -05:00
Matt McCutchen (Correct Computation) 19247d67f8 Merge branch 'main.thttpd' of github.com:correctcomputation/checkedc
Try to sort out gettimeofday / settimeofday.
2021-12-07 16:34:57 -05:00
Matt McCutchen (Correct Computation) 10e1e02674 Merge branch 'main.vsftpd' of github.com:correctcomputation/checkedc 2021-12-07 16:23:26 -05:00
John Kastner c14288d459 More dirent functions 2021-10-12 12:49:15 -04:00
John Kastner 31f7fb5230 Add resource.h 2021-10-11 11:20:47 -04:00
John Kastner 3108a2c75b More checked headers 2021-10-08 17:25:52 -04:00
John Kastner a4aa7300aa Add checked header for dirent 2021-10-07 16:27:48 -04:00
Sulekha Kulkarni d47eaf7f53
A 45-minute presentation on Checked C. (#476) 2021-09-29 15:55:10 -07:00
Katherine Kjeer 9baf1b72ca
Get lvalue observed bounds: update test (#474)
* Use a temporary variable and an additional dynamic bounds cast to establish the bounds of s1->f so they don't depend on s1->len before assigning to s1->len

* Move declarations of temporary variables

* Use dynamic bounds casts to set the observed bounds of s1->f to count(0) instead of using a temporary variable

* Use count(1) and count(2) for the observed bounds of s1->f when s1->len is set to 1 and 2 respectively
2021-09-10 14:46:30 -07:00
Sulekha Kulkarni 5952656993
Test cases for bundled block support. (#471)
* Test cases for bundled block support.

* Added more tests and comments and also fixed some formatting.

* Removed an unused parameter.

* Modified the error messages to account for the recent fixes on master.
2021-09-08 16:28:51 -07:00
Katherine Kjeer 6f6618a2e9
Update expected notes for assignments to pointer dereferences (#472) 2021-09-07 13:04:11 -07:00
Sulekha Kulkarni a657beb7cc
Clarification updates to the Checked C specification. (#469)
* Updated the spec to clarify the approach to bounds checking for
assignment expressions and function calls that mix checked and
unchecked pointer types.

* Incorporated review comments.

* Incorporated review comments - improved clarity.

* Fixed a typo.
2021-09-07 10:52:15 -07:00
Mandeep Singh Grang fcfe4fe5eb
Fix a test that invokes variadic functions in checked scope (#473)
https://github.com/microsoft/checkedc-clang/pull/1174 added support to call
variadic functions like printf/scanf, etc within checked scope. As a result,
tests that check for errors if such functions are invoked in checked scope
started failing. We fix one such test in this PR.
2021-09-02 15:39:16 -07:00
Sulekha Kulkarni 9199332281
Documentation fixes for checkedc issues #451 and #437. (#468) 2021-08-31 10:26:41 -07:00
Katherine Kjeer 42d801d2cf
Check return value bounds: update tests (#465)
* Add expected return value bounds unknown errors that were previously marked with TODOs (6 total added expected errors)

* Add expected return value bounds unknown errors that were not previously marked by TODOs (2 total added expected errors)

* Add 5 expected errors resulting from free variables in return bounds

* Remove expected return bounds error from r31f function with a bounds-safe interface in unchecked scope
2021-08-27 15:53:59 -07:00
Katherine Kjeer 2eb3a337d7
Treat address-of array subscripts the same way as address-of dereferences: update tests (#466)
* Add tests for the types of address-of dereference and array subscript expressions

* Remove expected error for _Nt_array_ptr<int> = _Nt_array_ptr<int> assignment in bounds_decl_checking.c

* Add more tests for typechecking address-of operators
2021-08-23 14:22:30 -07:00
Jie Zhou 5b51b0fc78
[spec] Fixed typos and missed words in Chapter 2, 5, and 6. (#464)
* [spec] Fixed typos and missed words in Chapter 2, 5, and 6.

* [spec] Fixed two more minor errors in the spec.
2021-08-03 19:15:27 -07:00
Katherine Kjeer 95c4ef4f33
Get variable and constant: update tests (#463) 2021-07-23 17:38:44 -07:00
Mandeep Singh Grang a8c0177520
Added slides for the LLVM Dev Meet 2020 talk (#462)
* Added slides for the LLVM Dev Meet 2020 talk
2021-07-20 09:33:10 -07:00
John Kastner ad51213e04 vsftpd additions 2021-07-13 12:05:49 -04:00
John Kastner 6a057cd9c8 crypt.h shadow.h and mman.h 2021-07-08 13:08:39 -04:00
Mandeep Singh Grang aeac0f8378
An nt_checked array with an empty initializer list should be an error (#461)
Fixing a unit test in response to the fix for issue
https://github.com/microsoft/checkedc-clang/issues/1120
2021-07-07 15:10:05 -07:00
Matt McCutchen (Correct Computation) 7c6f388a81 Add missing return itype to gethostbyaddr: oops. 2021-07-07 14:32:04 -04:00
Matt McCutchen (Correct Computation) 49bb8c5b0a Fix return type of cnd_init. 2021-07-06 11:44:47 -04:00
Matt McCutchen (Correct Computation) 16b7840f82 Revisions to syslog_checked.h.
With comments about what still needs review.
2021-07-06 10:53:07 -04:00
Matt McCutchen (Correct Computation) 79c638dec3 Minor changes to {netdb,pwd}_checked.h.
- Remove some _Unchecked that were there for no apparent reason.

- Add some `restrict` qualifiers to match POSIX. These should be
  checked later for the rest of the functions we added.
2021-07-06 10:45:16 -04:00