PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: JuliaGPU/KernelAbstractions.jl (julia)

Issue:
`StackOverflowError` on `get_backend(::UnitRange)`
MRE:

```
julia> using KernelAbstractions # v0.9.34

julia> get_backend(1:3)
ERROR: StackOverflowError:
Stacktrace:
 [1] get_backend(A::UnitRange{Int64}) (repeats 79984 times)
   @ KernelAbstractions C:\Users\konin_bt\.julia\packages\KernelAbstractions\sWSE0\src\KernelAbstractions.jl:519
```

I can imagine that trying to obtain the backend of an `UnitRange` is not a useful thing to do, but this probably still isn't desirable behavior.

This issue looks similar to https://github.com/JuliaGPU/KernelAbstractions.jl/issues/366.

Pull request:
Prevent the `get_backend` methods from overflowing the stack/recurring without bound.

Hoping this doesn't cause inference issues due to deeper call stacks.

Fixes #588

Patch:
diff --git a/src/KernelAbstractions.jl b/src/KernelAbstractions.jl
index ae258a56..15757e3a 100644
--- a/src/KernelAbstractions.jl
+++ b/src/KernelAbstractions.jl
@@ -511,7 +511,13 @@ Get a [`Backend`](@ref) instance suitable for array `A`.
 function get_backend end
 
 # Should cover SubArray, ReshapedArray, ReinterpretArray, Hermitian, AbstractTriangular, etc.:
-get_backend(A::AbstractArray) = get_backend(parent(A))
+function get_backend(A::AbstractArray)
+    P = parent(A)
+    if P isa typeof(A)
+        throw(ArgumentError("Implement `KernelAbstractions.get_backend(::$(typeof(A)))`"))
+    end
+    return get_backend(P)
+end
 
 # Define:
 #   adapt_storage(::Backend, a::Array) = adapt(BackendArray, a)


Test patch:
diff --git a/test/test.jl b/test/test.jl
index 0ac7df17..640b32c0 100644
--- a/test/test.jl
+++ b/test/test.jl
@@ -7,6 +7,9 @@ using Adapt
 
 identity(x) = x
 
+struct UnknownAbstractVector <: AbstractVector{Float32}  # issue #588
+end
+
 function unittest_testsuite(Backend, backend_str, backend_mod, BackendArrayT; skip_tests = Set{String}())
     @conditional_testset "partition" skip_tests begin
         backend = Backend()
@@ -80,6 +83,7 @@ function unittest_testsuite(Backend, backend_str, backend_mod, BackendArrayT; sk
         @test @inferred(KernelAbstractions.get_backend(view(A, 2:4, 1:3))) isa backendT
         @test @inferred(KernelAbstractions.get_backend(Diagonal(x))) isa backendT
         @test @inferred(KernelAbstractions.get_backend(Tridiagonal(A))) isa backendT
+        @test_throws ArgumentError KernelAbstractions.get_backend(UnknownAbstractVector())  # issue #588
     end
 
     @conditional_testset "sparse" skip_tests begin
Repository: segmentio/encoding (go)

Issue:
Different error message with encoding/json
Here is an example
json.go
```
package main

import (
	"encoding/json"
	"fmt"
	"math"
)

type A struct {
	B float64
}

func main() {
	c := A{
		B: math.NaN(),
	}
	_, err := json.Marshal(c)
	fmt.Println(err)
}
```

```
diff json.go json_segmentio.go
< 	"encoding/json"
---
> 	"github.com/segmentio/encoding/json"
```
The output of `json.go`:
```
json: unsupported value: NaN
```
The output of `json_segmentio.go`:
```
json: unsupported value: unsupported value
```

Pull request:
fix issue 11
Fixes #11 

```
=== RUN   TestGithubIssue11
--- PASS: TestGithubIssue11 (0.00s)
    json_test.go:1204: json: unsupported value: NaN
PASS
ok      github.com/segmentio/encoding/json      0.528s
```

Patch:
diff --git a/json/encode.go b/json/encode.go
index 98873f1..8f0096d 100644
--- a/json/encode.go
+++ b/json/encode.go
@@ -79,8 +79,11 @@ func (e encoder) encodeFloat64(b []byte, p unsafe.Pointer) ([]byte, error) {
 }
 
 func (e encoder) encodeFloat(b []byte, f float64, bits int) ([]byte, error) {
-	if math.IsNaN(f) || math.IsInf(f, 0) {
-		return b, &UnsupportedValueError{Value: reflect.ValueOf(f), Str: "unsupported value"}
+	switch {
+	case math.IsNaN(f):
+		return b, &UnsupportedValueError{Value: reflect.ValueOf(f), Str: "NaN"}
+	case math.IsInf(f, 0):
+		return b, &UnsupportedValueError{Value: reflect.ValueOf(f), Str: "inf"}
 	}
 
 	// Convert as if by ES6 number to string conversion.


Test patch:
diff --git a/json/json_test.go b/json/json_test.go
index a00b5f3..fe525c9 100644
--- a/json/json_test.go
+++ b/json/json_test.go
@@ -1188,3 +1188,19 @@ func (m *testMarshaller) MarshalJSON() ([]byte, error) {
 func (m *testMarshaller) UnmarshalJSON(data []byte) error {
 	return Unmarshal(data, &m.v)
 }
+
+func TestGithubIssue11(t *testing.T) {
+	// https://github.com/segmentio/encoding/issues/11
+	v := struct{ F float64 }{
+		F: math.NaN(),
+	}
+
+	_, err := Marshal(v)
+	if err == nil {
+		t.Error("no error returned when marshalling NaN value")
+	} else if s := err.Error(); !strings.Contains(s, "NaN") {
+		t.Error("error returned when marshalling NaN value does not mention 'NaN':", s)
+	} else {
+		t.Log(s)
+	}
+}
Repository: vazco/uniforms (ts)

Issue:
Textfield type="password" not working for antd style
The `'uniforms-antd/TextField` does not properly pass the `type` prop. See below.

For demonstration, I imported both antd and unstyled versions. The antd does not mask the input field as expected.  

```jsx
import AutoForm from 'uniforms-antd/AutoForm';
import TextField from 'uniforms-antd/TextField';
import TextField2 from 'uniforms-unstyled/TextField';

<AutoForm schema={loginFormSchema} onSubmit={submitLogin}>
 <TextField name="email" />
 <TextField name="password" type="password" />
 <TextField2 name="password" type="password" />
 <SubmitField>Submit</SubmitField>
</AutoForm>
```
![2017-09-11 10 40 16](https://user-images.githubusercontent.com/136654/30280410-aa704754-96dd-11e7-8bd2-f68494630c6b.gif)


Pull request:
Fix TextField type prop for antd  (closes #345)
Should fix #345 

@radekmie Let me know if this PR is okay.

I didn't see a need to touch `filterDOMProps` especially since its being used by all other style versions. It seems it was just a missed prop.

Patch:
diff --git a/packages/uniforms-antd/src/TextField.js b/packages/uniforms-antd/src/TextField.js
index 814f3ca2..78b836fd 100644
--- a/packages/uniforms-antd/src/TextField.js
+++ b/packages/uniforms-antd/src/TextField.js
@@ -14,6 +14,7 @@ const Text = props =>
             onChange={event => props.onChange(event.target.value)}
             placeholder={props.placeholder}
             ref={props.inputRef}
+            type={props.type}
             value={props.value}
             {...filterDOMProps(props)}
         />


Test patch:
diff --git a/packages/uniforms-antd/__tests__/TextField.js b/packages/uniforms-antd/__tests__/TextField.js
index d769d3e8..ee6924c5 100644
--- a/packages/uniforms-antd/__tests__/TextField.js
+++ b/packages/uniforms-antd/__tests__/TextField.js
@@ -134,3 +134,10 @@ test('<TextField> - renders a wrapper with unknown props', () => {
     expect(wrapper.find(Input).prop('data-y')).toBe('y');
     expect(wrapper.find(Input).prop('data-z')).toBe('z');
 });
+
+test('<TextField> - renders a input with correct type prop', () => {
+    const element = <TextField name="x" type="password" />;
+    const wrapper = mount(element, createContext({x: {type: String}}));
+
+    expect(wrapper.find(Input).prop('type')).toBe('password');
+});