<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in interrupt.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>adff9d9d - Fix externref/anyref ownership in C/C++ API (#11799)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#adff9d9d</link>
        <description>Fix externref/anyref ownership in C/C++ API (#11799)* Fix externref/anyref ownership in C/C++ APIThis commit is a follow-up to #11514 which was discovered throughfailing tests in the wasmtime-py repository when updating to Wasmtime37.0.0. Effectively a combination of bugs in the Rust API meant that itwasn&apos;t possible to use `externref` or `anyref` bindings correctly. TheRust changes in this commit are:* `wasmtime_val_unroot` correctly drops the value now as opposed to  effectively being a noop from before (typo of using `as_externref` vs  `from_externref`).* `wasmtime_{anyref,externref,val}_t` now have a `Drop` implementation  in Rust to correctly drop them if a value in Rust is dropped. This is  required to correctly manage memory in the `wasmtime_func_{call,new}`  implementations, for example.* `wasmtime_{anyref,externref,val}_clone` no longer have an unnecessary  context parameter.* `wasmtime_{anyref,externref,val}_unroot` no longer have an unnecessary  context parameter.Changes in the C/C++ APIs are:* `Result::{ok,err}_ref` APIs were added in addition to the preexisting  rvalue accessors.* Loading/storing typed arguments now has an overload for `const T&amp;` and  `T&amp;&amp;` which behaves differently. Notably transferring ownership for  `T&amp;&amp;` and not for `const T&amp;`. This means that passing parameters when  calling a wasm function uses `const T&amp;`, but passing results from a  host import uses `T&amp;&amp;`.* `TypedFunc::call` now uses `const Params&amp;` instead of `Params` to  explicitly specify it doesn&apos;t modify the parameters and forces using  the `const T&amp;` store method.* `Store::gc` is now a convenience method for `store.context().gc()`* `ExternRef`, `AnyRef`, and `Val` now have ownership semantics and  destructors. This matches the spirit of #11514 for Rust but models it  in C++ as well. This required filling out move/copy  constructors/assignments.* The explicit `ExternRef` now takes `std::any` instead of `T`.* Minor issues related to ownership are fixed in `Val` bindings.Valgrind was used to ensure that there were no leaks for the test suitewhich additionally resulted in a number of `*_delete` calls being addedto tests using the C API (accidental omissions).The original goal of this change was to be a patch release for 37.0.1 toenable updating wasmtime-py to the 37.0.x releases of Wasmtime. In theend though the changes here were broad enough that I no longer feel thatthis is a good idea, so wasmtime-py will be skipping the 37 version ofWasmtime.* Run `clang-format`prtest:full

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Tue, 07 Oct 2025 16:36:13 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>57ba95e9 - Fixed bugs in the C thread example program and updated some comments for build command. (#11155)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#57ba95e9</link>
        <description>Fixed bugs in the C thread example program and updated some comments for build command. (#11155)* Remove the cargo command for examples/*.c and fix thread example code.* Add _GNU_SOURCE.

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Mon, 30 Jun 2025 17:37:35 +0000</pubDate>
        <dc:creator>Masashi Yoshimura &lt;yoshimura.masashi.frbs@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>8f03b22e - Remove wasm-c-api submodule (#8170)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#8f03b22e</link>
        <description>Remove wasm-c-api submodule (#8170)* Remove wasm-c-api submoduleThis submodule hasn&apos;t been updated in ~3 years at this point and weadditionally don&apos;t need most of the submodule. Instead add a script tocopy the files we need and verify in CI that the files are up-to-date.This also makes using the C API a bit nicer where you don&apos;t have to havetwo `include` directories with a Wasmtime source tree, just onesuffices.* Don&apos;t format wasm.h{,h} vendored files

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Mon, 18 Mar 2024 18:58:11 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>93580f24 - examples: Don&apos;t `fread()` within `assert(...)`. (#7803)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#93580f24</link>
        <description>examples: Don&apos;t `fread()` within `assert(...)`. (#7803)This is fine in debug builds but release builds without assertionsresults in the file data not being read.

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Mon, 22 Jan 2024 17:10:14 +0000</pubDate>
        <dc:creator>Bruce Mitchener &lt;bruce.mitchener@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>f8fee938 - add clang format (#7601)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#f8fee938</link>
        <description>add clang format (#7601)* add clang-formatWe chose WebKit style because out of all the builtin styles it seems theclosest to what already exists in wasmtime.Signed-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* c-api: don&apos;t reorder headersThe order here mattersSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* c-api: apply clang-formatSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* fiber: apply clang-formatSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* runtime: apply clang-formatSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* examples: apply clang formatSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* tests: apply clang-formatSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* ci: add clang-format checksSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* clang-format: keep braces on the same lineThis is more the existing styleSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* remove clang-formatJust use the tool defaults (LLVM)Signed-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* Fix ci nameSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* manually reformat a couple of commentsprtest:fullSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* disable formatting for doc-wasm.hSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* manually reformat wasmtime.hSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* disable formattingTo prevent a link from being brokenSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* examples: fixing build commandsSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* fix parameter commentSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;---------Signed-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Wed, 29 Nov 2023 18:39:04 +0000</pubDate>
        <dc:creator>Tyler Rockwood &lt;rockwotj@users.noreply.github.com&gt;</dc:creator>
    </item>
<item>
        <title>2ba3025e - Add cmake compatibility to c-api (#4369)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#2ba3025e</link>
        <description>Add cmake compatibility to c-api (#4369)* Add cmake compatibility to c-api* Add CMake documentation to wasmtime.h* Add CMake instructions in examples* Modify CI for CMake support* Use correct rust in CI* Trigger build* Refactor run-examples* Reintroduce example_to_run in run-examples* Replace run-examples crate with cmake* Fix markdown formatting in examples readme* Fix cmake test quotes* Build rust wasm before cmake tests* Pass CTEST_OUTPUT_ON_FAILURE* Another cmake test* Handle os differences in cmake test* Fix bugs in memory and multimemory examples

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Fri, 22 Jul 2022 17:22:36 +0000</pubDate>
        <dc:creator>TheGreatRambler &lt;31906920+TheGreatRambler@users.noreply.github.com&gt;</dc:creator>
    </item>
<item>
        <title>c22033bf - Delete historical interruptable support in Wasmtime (#3925)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#c22033bf</link>
        <description>Delete historical interruptable support in Wasmtime (#3925)* Delete historical interruptable support in WasmtimeThis commit removes the `Config::interruptable` configuration along withthe `InterruptHandle` type from the `wasmtime` crate. The originalsupport for adding interruption to WebAssembly was added pretty early onin the history of Wasmtime when there was no other method to prevent aninfinite loop from the host. Nowadays, however, there are alternativemethods for interruption such as fuel or epoch-based interruption.One of the major downsides of `Config::interruptable` is that even whenit&apos;s not enabled it forces an atomic swap to happen when enteringWebAssembly code. This technically could be a non-atomic swap if theconfiguration option isn&apos;t enabled but that produces even more branch-ycode on entry into WebAssembly which is already something we try tooptimize. Calling into WebAssembly is on the order of a dozens ofnanoseconds at this time and an atomic swap, even uncontended, can addup to 5ns on some platforms.The main goal of this PR is to remove this atomic swap on entry intoWebAssembly. This is done by removing the `Config::interruptable` fieldentirely, moving all existing consumers to epochs instead which aresuitable for the same purposes. This means that the stack overflow checkis no longer entangled with the interruption check and perhaps one daywe could continue to optimize that further as well.Some consequences of this change are:* Epochs are now the only method of remote-thread interruption.* There are no more Wasmtime traps that produces the `Interrupted` trap  code, although we may wish to move future traps to this so I left it  in place.* The C API support for interrupt handles was also removed and bindings  for epoch methods were added.* Function-entry checks for interruption are a tiny bit less efficient  since one check is performed for the stack limit and a second is  performed for the epoch as opposed to the `Config::interruptable`  style of bundling the stack limit and the interrupt check in one. It&apos;s  expected though that this is likely to not really be measurable.* The old `VMInterrupts` structure is renamed to `VMRuntimeLimits`.

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Mon, 14 Mar 2022 20:25:11 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>f3b80ece - c-api: add wasmtime_trap_code (#3086)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#f3b80ece</link>
        <description>c-api: add wasmtime_trap_code (#3086)Eventually this should be added to the wasmtime-go binding, addressinghttps://github.com/bytecodealliance/wasmtime-go/issues/63.Added a snippet to examples/interrupt.c to verify that this works asexpected in manual testing.Signed-off-by: Stephan Renatus &lt;stephan.renatus@gmail.com&gt;

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Thu, 15 Jul 2021 15:31:03 +0000</pubDate>
        <dc:creator>Stephan Renatus &lt;stephan@styra.com&gt;</dc:creator>
    </item>
<item>
        <title>7a1b7cdf - Implement RFC 11: Redesigning Wasmtime&apos;s APIs (#2897)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#7a1b7cdf</link>
        <description>Implement RFC 11: Redesigning Wasmtime&apos;s APIs (#2897)Implement Wasmtime&apos;s new API as designed by RFC 11. This is quite a large commit which has had lots of discussion externally, so for more information it&apos;s best to read the RFC thread and the PR thread.

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Thu, 03 Jun 2021 14:10:53 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>f94db655 - Update WebAssembly C API submodule to latest commit. (#2579)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#f94db655</link>
        <description>Update WebAssembly C API submodule to latest commit. (#2579)* Update WebAssembly C API submodule to latest commit.This commit updates the WebAssembly C API submodule (for `wasm.h`) to thelatest commit out of master.This fixes the behavior of `wasm_name_new_from_string` such that it no longercopies the null character into the name, which caused unexpected failures whenusing the Wasmtime linker as imports wouldn&apos;t resolve when the null waspresent.Along with this change were breaking changes to `wasm_func_call`, the hostcallback signatures, and `wasm_instance_new` to take a vector type instead of apointer to an unsized array.As a result, Wasmtime language bindings based on the C API will need to beupdated once this change is pulled in.Fixes #2211.Fixes #2131.* Update Doxygen comments for wasm.h changes.

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Thu, 14 Jan 2021 15:36:12 +0000</pubDate>
        <dc:creator>Peter Huene &lt;peter@huene.dev&gt;</dc:creator>
    </item>
<item>
        <title>eb650f6f - filesystem example (#2236)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#eb650f6f</link>
        <description>filesystem example (#2236)

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Tue, 29 Sep 2020 18:20:14 +0000</pubDate>
        <dc:creator>Joshua Warner &lt;joshuawarner32@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>a817470f - Fix signature of wasmtime_module_new</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#a817470f</link>
        <description>Fix signature of wasmtime_module_new

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Wed, 15 Jul 2020 19:07:36 +0000</pubDate>
        <dc:creator>Yury Delendik &lt;ydelendik@mozilla.com&gt;</dc:creator>
    </item>
<item>
        <title>15c68f2c - Disconnects `Store` state fields from `Compiler` (#1761)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#15c68f2c</link>
        <description>Disconnects `Store` state fields from `Compiler` (#1761)*  Moves CodeMemory, VMInterrupts and SignatureRegistry from Compiler*  CompiledModule holds CodeMemory and GdbJitImageRegistration*  Store keeps track of its JIT code*  Makes &quot;jit_int.rs&quot; stuff Send+Sync*  Adds the threads example.

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Tue, 02 Jun 2020 18:44:39 +0000</pubDate>
        <dc:creator>Yury Delendik &lt;ydelendik@mozilla.com&gt;</dc:creator>
    </item>
<item>
        <title>c9a0ba81 - Implement interrupting wasm code, reimplement stack overflow (#1490)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/interrupt.c#c9a0ba81</link>
        <description>Implement interrupting wasm code, reimplement stack overflow (#1490)* Implement interrupting wasm code, reimplement stack overflowThis commit is a relatively large change for wasmtime with two maingoals:* Primarily this enables interrupting executing wasm code with a trap,  preventing infinite loops in wasm code. Note that resumption of the  wasm code is not a goal of this commit.* Additionally this commit reimplements how we handle stack overflow to  ensure that host functions always have a reasonable amount of stack to  run on. This fixes an issue where we might longjmp out of a host  function, skipping destructors.Lots of various odds and ends end up falling out in this commit once thetwo goals above were implemented. The strategy for implementing this wasalso lifted from Spidermonkey and existing functionality inside ofCranelift. I&apos;ve tried to write up thorough documentation of how this allworks in `crates/environ/src/cranelift.rs` where gnarly-ish bits are.A brief summary of how this works is that each function and each loopheader now checks to see if they&apos;re interrupted. Interrupts and thestack overflow check are actually folded into one now, where functionheaders check to see if they&apos;ve run out of stack and the sentinel valueused to indicate an interrupt, checked in loop headers, tricks functionsinto thinking they&apos;re out of stack. An interrupt is basically justwriting a value to a location which is read by JIT code.When interrupts are delivered and what triggers them has been left up toembedders of the `wasmtime` crate. The `wasmtime::Store` type has amethod to acquire an `InterruptHandle`, where `InterruptHandle` is a`Send` and `Sync` type which can travel to other threads (or perhapseven a signal handler) to get notified from. It&apos;s intended that thisprovides a good degree of flexibility when interrupting wasm code. Notethough that this does have a large caveat where interrupts don&apos;t workwhen you&apos;re interrupting host code, so if you&apos;ve got a host importblocking for a long time an interrupt won&apos;t actually be received untilthe wasm starts running again.Some fallout included from this change is:* Unix signal handlers are no longer registered with `SA_ONSTACK`.  Instead they run on the native stack the thread was already using.  This is possible since stack overflow isn&apos;t handled by hitting the  guard page, but rather it&apos;s explicitly checked for in wasm now. Native  stack overflow will continue to abort the process as usual.* Unix sigaltstack management is now no longer necessary since we don&apos;t  use it any more.* Windows no longer has any need to reset guard pages since we no longer  try to recover from faults on guard pages.* On all targets probestack intrinsics are disabled since we use a  different mechanism for catching stack overflow.* The C API has been updated with interrupts handles. An example has  also been added which shows off how to interrupt a module.Closes #139Closes #860Closes #900* Update comment about magical interrupt value* Store stack limit as a global value, not a closure* Run rustfmt* Handle review comments* Add a comment about SA_ONSTACK* Use `usize` for type of `INTERRUPTED`* Parse human-readable durations* Bring back sigaltstack handlingAllows libstd to print out stack overflow on failure still.* Add parsing and emission of stack limit-via-preamble* Fix new example for new apis* Fix host segfault test in release mode* Fix new doc example

            List of files:
            /wasmtime-44.0.1/examples/interrupt.c</description>
        <pubDate>Tue, 21 Apr 2020 18:03:28 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
</channel>
</rss>
