PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: asynkron/protoactor-dotnet (csharp)

Issue:
IndexOutOfRangeException when using IContextStore.Set
I get `IndexOutOfRangeException `while using `IContextStore.Set`. Looks like a bug in `TypedDictionary`

bacause:
`private static int typeIndex = -1;`

when we use `Add`:

```
public void Add<TKey>(TValue value)
    {
        lock (_lockObject)
        {
            var id = TypeKey<TKey>.Id;

            if (id >= _values.Length)
            {
                Array.Resize(ref _values, (int)(id * _growthFactor));
            }

            _values[id] = value;
        }
    }
```

With very first use `id `becomes `0 ` and `0 * _growthFactor = 0` so `_values[id] = value;` fails.

Pull request:
## Description

Fixes #1908

## Purpose
This pull request is a:

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)


## Checklist

<!-- Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code. -->

- [x] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added necessary documentation (if appropriate)

Patch:
diff --git a/src/Proto.Actor/Utils/TypedDictionary.cs b/src/Proto.Actor/Utils/TypedDictionary.cs
index b7c8b6d6e0..07df7dce6c 100644
--- a/src/Proto.Actor/Utils/TypedDictionary.cs
+++ b/src/Proto.Actor/Utils/TypedDictionary.cs
@@ -35,7 +35,7 @@ public void Add<TKey>(TValue value)
 
             if (id >= _values.Length)
             {
-                Array.Resize(ref _values, (int)(id * _growthFactor));
+                Array.Resize(ref _values, (int)((id + 1) * _growthFactor));
             }
 
             _values[id] = value;


Test patch:
diff --git a/tests/Proto.Actor.Tests/StoreTests.cs b/tests/Proto.Actor.Tests/StoreTests.cs
new file mode 100644
index 0000000000..4e062d1f3d
--- /dev/null
+++ b/tests/Proto.Actor.Tests/StoreTests.cs
@@ -0,0 +1,24 @@
+﻿using System.Threading.Tasks;
+using Xunit;
+
+namespace Proto.Tests;
+
+public class StoreTests
+{
+    [Fact]
+    public async Task Given_RootContextStore_SetAndGetCustomObject()
+    {
+        await using var system = new ActorSystem();
+        var context = system.Root;
+
+        var toStore = new StoreType();
+        context.Set(toStore);
+        var fromStore = context.Get<StoreType>();
+
+        Assert.Same(toStore, fromStore);
+    }
+
+    class StoreType
+    {
+    }
+}
\ No newline at end of file
Repository: rust-lang/cc-rs (rust)

Issue:
Target strings that end in -none (such as aarch64-unknown-none) should not default to -fPIC
According to the [docs](https://docs.rs/cc/latest/cc/struct.Build.html#method.pic)

> This [pic] option defaults to false for windows-gnu and bare metal targets and to true for all other targets.

This means the bare metal target `aarch64-unknown-none` should default to false, but the current logic only looks for `-none-`, and not `-none`.

Pull request:
disable pic for targets that end in `-none`
This fixes #1211

Patch:
diff --git a/src/lib.rs b/src/lib.rs
index e963828..2a7e3a1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1983,6 +1983,7 @@ impl Build {
                 if self.pic.unwrap_or(
                     !target.contains("windows")
                         && !target.contains("-none-")
+                        && !target.ends_with("-none")
                         && !target.contains("uefi"),
                 ) {
                     cmd.push_cc_arg("-fPIC".into());


Test patch:
diff --git a/tests/test.rs b/tests/test.rs
index 5f31f3e..9d5ce50 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -269,6 +269,20 @@ fn gnu_x86_64_no_plt() {
     test.cmd(0).must_have("-fno-plt");
 }
 
+#[test]
+fn gnu_aarch64_none_no_pic() {
+    for target in &["aarch64-unknown-none-gnu", "aarch64-unknown-none"] {
+        let test = Test::gnu();
+        test.gcc()
+            .target(&target)
+            .host(&target)
+            .file("foo.c")
+            .compile("foo");
+
+        test.cmd(0).must_not_have("-fPIC");
+    }
+}
+
 #[test]
 fn gnu_set_stdlib() {
     reset_env();