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

946 Коммитов

Автор SHA1 Сообщение Дата
Matthew Parkinson 497f5fc3f2
Fixes #651 (#667)
* Make verona testsuite directory dump passes.

* Add test case for issue #651

* Extend test to cover related bug.
2024-04-24 10:16:57 +01:00
Matthew Parkinson cf81a493de
Fixes issue 668 (#669)
* Fixes issue 668

The error message for default args was added to a Node that was then removed from the AST.
This fixes that and ensures the error is only reported once.

* Clangformat

* Update trieste again.
2024-04-23 17:18:39 +01:00
Matthew Parkinson 8eb401d9be
Add comment section to specification (#666)
* Move lexical section into separate file

* Explain comment syntax.

* Make file more self-contained.
2024-04-23 15:12:44 +01:00
Matthew Parkinson fc3c6df2e0
Automatically generate launch.json (#665)
This adds a CMake option to automatically generate the launch.json file for vscode that runs everything in the testsuite.
2024-04-11 15:10:02 +01:00
Matthew Parkinson 66798975bc
Multi-line comments should be (#664)
* Add a broken nesting example

* Add some comment examples

* Multi-line comments should be

RE2 `.` does not match newlines by default.  This allows newlines inside multi-line comments.
2024-04-11 15:04:34 +01:00
Sylvan Clebsch 6dd1ec81ca
Initial TOC draft for the language specification. (#653)
* Initial TOC draft for the language specification.

* Added changes and comments from discussion.

---------

Co-authored-by: Matthew Parkinson <mattpark@microsoft.com>
2024-04-03 15:11:47 +01:00
Matthew Parkinson da8383c1f3
Update Trieste version. (#654) 2024-04-02 11:52:57 +01:00
Matthew Parkinson b8d1528c1b
Update CI workaround. (#650) 2024-01-02 10:43:31 +00:00
Matthew Parkinson 0cd9a3b3e5
Update to latest trieste version (#647)
* Update to latest trieste version

This reduces the compile time by around 20% as the latest Trieste does
not include CPP::CLI in the main header.
2023-11-27 13:29:46 +00:00
Matthew Parkinson d8d30ed0ca
Add dump of passes (removing stdlib) (#648)
* Add dump of passes (removing stdlib)

* Fix CI clang.
2023-11-27 13:02:40 +00:00
Matthew Parkinson 24aef09a54
Reinstate old test suite (#645)
* Reinstate old test suite

This is a simple output comparison based testsuite.

The previous version of this is on the `old-version` branch.

* Windows line endings fix.
2023-10-05 08:56:55 +01:00
Matthew Parkinson 0c254c3fda
Sanitizer (#644)
* Add sanitizer coverage to CMake and CI.
* Fix bug found by sanitizer
* Add GCC and Clangformat to CI.
* Enable workflow dispatch
2023-10-03 16:24:57 +01:00
Sylvan Clebsch 61bddfc4e6
Update for the new trieste driver code (#643)
* track predicates while traversing the AST

* use new trieste driver

* disable typeinfer pass, WIP
2023-09-27 04:04:10 +01:00
Sylvan Clebsch 5d6a8a72a2
Stable type names (#642)
* use typevar function

* lift lambda classes to the block, not the classbody

* use node to token comparison

* WIP, need to lift lambdas earlier

* change all dir::once passes to bottomup

* pick up trieste performance improvements

* move conditionals pass earlier

* detect bad default args early

* separate reference and typereference

* move the lambda pass earlier

* move autocreate and defaultargs earlier

* fix defaultargs param order

* remove symtab from Block

* discard std::equal result as a pairwise check

* capture param type before error is emitted
2023-09-26 05:46:37 +01:00
Sylvan Clebsch 5b548e01a1
fix subtype arity checking (#641) 2023-09-02 17:14:15 +01:00
Sylvan Clebsch 91c8b33e59
Code reuse (#640)
* move std into the top level of the source tree

* check typeargs on functions

* use Ident for function names even when they're Symbols

* use fully qualified names

* detect too many typeargs

* use lookup sets instead of vectors

* auto-insert

* memberconflict now finds defaultarg arity conflicts

* detect recursive inheritance

* code reuse, still needs type substitution

* diamond inheritance with a better error message

* type substitution in code reuse

* bug fixes
2023-08-31 21:33:00 +01:00
Sylvan Clebsch 7f7d303432
Turn lhs Call inside an NLRCheck into CallLHS (#638) 2023-07-14 16:34:27 +01:00
Sylvan Clebsch 0ca71c6e1b
Mark implicit functions (#637)
* mark functions as explicit or implicit

* don't report errors inside implicit functions
2023-07-14 15:46:16 +01:00
Matthew Parkinson 95c185eb40
Create cmake.yml (#636) 2023-07-14 09:33:04 +01:00
Sylvan Clebsch f06ed5d724
A Trieste-based Verona compiler. (#635) 2023-07-13 15:07:02 +01:00
Matthew Parkinson effc08b3f0
Reboot the Verona Repo (#634)
This commit removes almost everything from the repo.  This is in
preparation for bringing in the new Trieste based frontend.

The commit is very aggressive in removing things, but old stuff
can be reinstated from the `old_version` branch.

The aim is to ensure everything in the repo is consistent, so we
will need to PR in any documentation and code.
2023-07-13 13:36:26 +01:00
David Chisnall b908e6e12c Fix the process sandbox.
libfmt changed a bunch of things, snmalloc is no longer in the tree.
2023-02-08 16:55:50 +00:00
Matthew Parkinson e434183362
Linking to new repo for runtime. (#627) 2022-10-24 16:17:12 +01:00
Matthew Parkinson 6d2ca07b6a
Add cown_ptr::weak to the API (#625) 2022-10-14 15:24:41 +01:00
Matthew Parkinson 301a538bd4
Small improvement to epoch rejoin code (#621) 2022-10-13 14:25:16 +01:00
Erik Mavrinac 70d70fc89e
Pass through additional ADO env vars to AnyBuild (#622)
To improve joins of AnyBuild telemetry with ADO telemetry.
2022-10-13 14:23:19 +01:00
Matthew Parkinson c067ace3a8
Fix bug in weak reference counting (#624)
* Fix region_rc to use correct method

* Fix bug in weak reference count

The existing implementation has a bug in promoting a weak reference
count to strong.  This address this bug, and
documents the fix, and provides a proof of the properties using
starling.
2022-10-13 14:11:03 +01:00
Matthew Parkinson 36734fd5d0
Some refactoring of reference count manipulation (#623)
* GC old code.

* Fix harness for deterministic epoch order

* Add collection of simple tests for debugging.

* Reduce reference count

* Remove a guard variable.
2022-10-11 15:18:59 +01:00
Matthew Parkinson 7edea0394e
Epoch fix (#619)
* Enable preventing pre-emption in systematic testing.

It can be useful to force a collection of operations to occur at a
sensitive point in an algorithm.  This block systematic testing from
breaking them into smaller operations.

* Disable FPWB in SysTesting

In systematic testing, there is no need to perform
FlushProcessWriteBuffers.  The program is executing sequentially
already, so this is not required.

* Fix bug in epoch mechanism

The logic was incorrectly determining if all the threads were in the
correct epoch.

The next commit will document this file.

* Make Asym lock return if it is the rentrant case.

* Add a few methods for checking the asym lock state

* Tidying and documentation of epoch mechanism

* Improve test coverage for noticeboard epoch usage

* Fixup changes to epoch mechanism

* Remove broken assert

* Increase frequency of epoch change

* White space

* Alter teardown to handle external threads.

* Fixup flushing.

* Fix atomic annotation

* Clangformat

* Minor

* CR with Sylvan

* Clangformat

* Improve rejoin protocol.

* Fix teardown leak.
2022-10-02 13:13:36 +01:00
Matthew Parkinson 1e9e46e0df
Update snmalloc (#620) 2022-09-30 14:25:02 +01:00
Matthew Parkinson 0bf233de8c
Remove leak detector (#617) 2022-09-29 09:57:14 +01:00
Luke Cheeseman e064cf576a
adding == and != comparison operators for cown_ptr and nullptr (#618)
* adding == and != comparison operators for cown_ptr and nullptr

* moving operator with member access inside struct

* adding nullptr assignment to cowns

* adding std to assignment operator
2022-09-28 18:42:00 +01:00
cui fliter 5bf2f75b7b
all: fix some typos (#616)
Signed-off-by: cui fliter <imcusg@gmail.com>
2022-09-20 09:14:28 +01:00
Matthew Parkinson 815741d2ce
Minor updates (#614)
* Win build fix.

* Update snmalloc.
2022-09-15 09:58:44 +01:00
ghosn adrien 4a41848d3e
Decoupling SchedulerThreads & Cown queues (#612) 2022-09-13 11:31:17 +01:00
Luke Cheeseman 61b55bc27c
Read-only Cowns (#595)
Co-authored-by: Matthew Parkinson <mattpark@microsoft.com>
2022-09-09 15:44:10 +01:00
Matthew Parkinson 49ee515333
Move header under conditional flag. (#613) 2022-09-05 17:54:32 +01:00
Matthew Parkinson 8f667eeea3
Remove assertion that is not true. (#610) 2022-09-01 18:25:44 +01:00
Matthew Parkinson 3e10870229
Consolidate allocation of message body (#609)
* Remove index as no longer needed.

* GC old code

* Optimise the multimessage body allocation

Prior to this commit the multimessage was composed of three allocations,
the body, the cowns array and the behaviour/closure to execute.  This
commit merges the three structures into a single
allocation.
2022-09-01 14:36:16 +01:00
Luke Cheeseman 84e0a1bd00
Add manual lock ordering to dining phils benchmark (#589)
* adding manual lock ordering for pthread dining philosophers benchmark

* do the index calculation only once in dining phils
2022-08-31 14:33:32 +01:00
Marios Kogias f9970e3921
Add Smallbank experiment (#601) 2022-08-31 13:43:35 +01:00
Matthew Parkinson 40862942a2
Optimise the RC for cown_ptr (#607) 2022-08-31 13:30:40 +01:00
Matthew Parkinson 956833494d
Fix #552 (#578)
Fixes #552. Their was a sporadic memory leak only observed on Windows. This PR adds some logging that helped diganose the issue, and fixes the issue.

The poller cown is decrefed by the external source, however this decref can occur
after the runtime has executed the teardown, and thus is leads to a memory
leak.

This commit changes the order so the last thing the external event source does
is decrease the event source count, and thus the runtime cannot begin teardown
until the external thread has completed all its actions.
2022-08-31 12:54:14 +01:00
Matthew Parkinson 2226b1c0cd
Fix `total_cowns` invariant (#608)
The variable `total_cowns` should be the length of the per-thread cown list.
This is not the case, this commit checks that this is the case, and correctly
updates it.
2022-08-30 17:47:10 +01:00
Matthew Parkinson cde8bcf647
Fix bug in C++ cown api (#603) 2022-07-12 18:02:27 +01:00
David Chisnall e2fe309320 Fix process sandbox for double faults.
The `snmalloc::message` function calls `fsync` on `stderr`.  With
Capsicum, this is an explicit permission and so tests that hit a code
path that did some logging (specifically, the curl test) in debug builds
during system call emulation would receive the second trap.

The first symptom of this is fixed by adding fsync permission to the
standard out / error file descriptors.  With that change, all of the
tests pass but the underlying problem remains: the signal is delivered
*after* return from the first system call, at which point it does not
have a sensible `ucontext` and things break in exciting ways
(sufficiently exciting that a debugger can't tell you anything useful).

The root cause is addressed by adding `SA_NODEFER` when registering the
signal handler.  This allows system calls that are used to emulate
other signal handlers to deliver their signals on top of the stack.  If
a system call is used in emulating itself, this still goes horribly
wrong, but in a way that's much easier to debug.

At the same time, use the SIGCAP support that is in process of being
upstreamed to FreeBSD.  This makes debugging Capsicum failures easier
because the debugger does not try to hide the signal from the
application whose correctness depends on handling it.
2022-07-12 10:22:38 +01:00
Matthew Parkinson 301482fe1a
Improved API for CPP (#598)
* Improved API for CPP

This introduces a namespace for the verona C++ api:
  verona::cpp

It also fixes a couple of move/copy constructor/operators.

* Fix assert, now assignment operator is correct.
2022-07-08 10:05:23 +01:00
Matthew Parkinson 95b3315efb
Updating snmalloc (#596) 2022-06-08 09:38:17 +01:00
David Chisnall 4d23e93ea6 [process-sandbox] Defence in depth
Add some deterministic initialisation to a buffer that is populated with
a variable-length attacker-controlled structure.

Fixes #561
2022-05-25 10:29:55 +01:00
David Chisnall 08cabb1a62 Try to fix the snmalloc update checker. 2022-05-20 13:48:13 +01:00