sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: a type inference bug of Deref
Labels: A-diagnostics,T-compiler,D-confusing

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
fn main() {
    let foo = Foo;
    let _ : B = (&foo).this();
}

struct Foo;
struct F;
struct Bar;
struct B;

impl std::ops::Deref for Foo{
    type Target = Bar;

    fn deref(&self) -> &Bar{
        &Bar
    } 
}

trait This {
    type T;
    fn this(&self) -> Self::T; 
}

impl This for Foo {
    type T = F;
    fn this(&self) -> F{
        F
    }
}

impl This for Bar {
    type T = B;
    fn this(&self) -> B{
        B
    }
}
```

I expected to see this happen: *explanation*

this code can't compile.

fot the code : 
```rust
let _ : B = (&foo).this();
```

the type of &foo is &Foo, trait This is impled for &Fo, 
but the return type of This::this is F, not B.   

Instead, this happened: *explanation*


but if we remove this : 
``` rust
impl This for Foo {
    type T = F;
    fn this(&self) -> F{
        F
    }
}
```

for the code :
``` rust
let _ : B = (&foo).this();
```

the type of &foo is &Bar,because trait This is impled for &Bar,
at this time, (&foo).this() == &Bar::this(&foo),the return type of &Bar::this is B.

playground : https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=5016d3d102959be5ece6b6687218b5ae

The problem is type inference, and &foo can at least be extrapolated to &Foo & Bar
For &Foo, it implements This but returns an F mismatch
For &Bar, it implements this and returns that B is a match

On a type mismatch, it automatically stops and reports an error
On trait that are not implemented, it continues to look for other possibilities
Repository: go
Issue: net: net.ListenUDP() only binds to IPv4 when 127.0.0.1 is not present
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.20.5 linux/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOENV="/home/user/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/user/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/user/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go-1.20"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.20/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.5"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/user/sslip.io/src/sslip.io-dns-server/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3799498623=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?
When running on a system with no IPv4 loopback address(127.0.0.1) present `net.ListenUDP("udp", &net.UDPAddr{Port: 1234})` binds to `0.0.0.0:1234` instead of `[::]:1234`. On IPv6 only systems with no IPv4 loopback this is undesirable.
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->



### What did you expect to see?
`net.ListenUDP("udp", &net.UDPAddr{Port: 1234})` should bind to `[::]:1234` when no IPv4 loopback is present on IPv6 only systems. Manually specifying the IPv6 wildcard address `::` in the net.UDPAddr struct works as expected. This is only present when no bind address is given.


### What did you see instead?
`net.ListenUDP("udp", &net.UDPAddr{Port: 1234})` binds to `0.0.0.0:1234` even though only IPv6 is present.
Repository: godot
Issue: E 0:00:00:0494   free_static: Condition "p_ptr == nullptr" is true.   <C++ Source>   core/os/memory.cpp:148 @ free_static()
Labels: bug,topic:core,needs testing

### Godot version

4.0.3.stable

### System information

Godot Engine v4.0.3.stable.fedora.5222a99f5 Fedora 38 Intel i7 7700k

### Issue description

minor issue, but game keeps spitting out 22 runtime errors saying
`E 0:00:00:0494   free_static: Condition "p_ptr == nullptr" is true. <C++ Source>   core/os/memory.cpp:148 @ free_static()`

im not sure exactly what may be causing itm but somthing in the code seems to be putting a nullptr in free_static apon project debugging

### Steps to reproduce

start up a project

### Minimal reproduction project

N/A
Repository: node
Issue: "...\\" breaks package.json parsing
Labels: v18.x

### Version

v18.16.1

### Platform

any

### Subsystem

_No response_

### What steps will reproduce the bug?

Demo:
```sh
mkdir package-json-bug
echo 'console.log("ok")' >package-json-bug/main.js
echo '{"foo":"\\","main":"main.js"}' >package-json-bug/package.json
node -e 'require("./package-json-bug")'
```


### How often does it reproduce? Is there a required condition?

It is triggered by having a string (key or value) that ends in an escaped backslash _before_ any occurrence of the [strings used by InternalModuleReadJSON as heuristic to detect a valid package.json file](https://github.com/nodejs/node/blob/v18.16.1/src/node_file.cc#L1076-L1081).  Each string that ends in an escaped backslash causes the scanner to fail to recognize the end-quote of the string and thus toggles the scanner's ability to recognize the key strings it's looking for.

Only the CJS loader seems to be affected, not the ESM loader.

### What is the expected behavior? Why is that the expected behavior?

The module loader not discarding a valid JSON file.

### What do you see instead?

```text
node:internal/modules/cjs/loader:1080
  throw err;
  ^

Error: Cannot find module './package-json-bug'
```

### Additional information

This has been mostly fixed (accidently I think) in node v20.4.0 by 15530fea4ced by disregarding the result of the scanner on all platforms except AIX, and the very recent 3205b1936 finally removed the broken code entirely.

A trivial fix for v18 would be:
```diff
diff --git i/src/node_file.cc w/src/node_file.cc
index 49ed96eca0..73ae2ada6f 100644
--- i/src/node_file.cc
+++ w/src/node_file.cc
@@ -1062,7 +1062,7 @@ static void InternalModuleReadJSON(const FunctionCallbackInfo<Value>& args) {
 
   while (p < pe) {
     char c = *p++;
-    if (c == '\\' && p < pe && *p == '"') p++;
+    if (c == '\\' && p < pe) p++;
     if (c != '"') continue;
     *ppos++ = p;
     if (ppos < &pos[2]) continue;
```
Repository: next.js
Issue: The location of the apple-icon in the doc is not working properly.
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64
    Binaries:
      Node: 16.16.0
      npm: 8.11.0
      Yarn: 1.22.17
      pnpm: 8.4.0
    Relevant packages:
      next: 13.4.1
      eslint-config-next: 13.4.1
      react: 18.2.0
      react-dom: 18.2.0
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

Metadata (metadata, generateMetadata, next/head)

### Link to the code that reproduces this issue or a replay of the bug

https://codesandbox.io/p/sandbox/unruffled-darkness-q2l3ht

### To Reproduce

1. locate `apple-icon.png` in `/app`
    - It works well
2. locate `apple-icon.png` in `/app/**/apple-icon.png`
     - It doesn't work 
     
![스크린샷 2023-07-12 오후 1 49 18](https://github.com/vercel/next.js/assets/80238096/6384601c-803b-4b2e-822c-89dcb5355f6c)
> can't see apple-touch-icon


But in docs (https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons#image-files-ico-jpg-png)
![image](https://github.com/vercel/next.js/assets/80238096/82d6ede2-4a30-4477-a6ef-a90956873529)

apple-icon is valid on `app/**/*`

### Describe the Bug

[The location of the apple-icon in the document in Next.js](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons#image-files-ico-jpg-png) is not working properly.

`/app/apple-icon.png` works fine, but `/app/icons/apple-icon.png` does not work properly.

### Expected Behavior

apple-icon is valid on `app/**/*`

### Which browser are you using? (if relevant)

Chrome 114.0.5735.198

### How are you deploying your application? (if relevant)

next start
Repository: tensorflow
Issue: tf.linalg.logdet outputs -inf on a matrix with complex data type
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.13

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

2.13.0

### Custom code

Yes

### OS platform and distribution

_No response_

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

Given the following matrix:
```
t = np.array([[1 + 1j, 4 + 1j], [4 + 2j, 3 + 1j]])
```
tf.linalg.logdet outputs `-inf`, I think the expected output should be a normal value. For reference, PyTorch's torch.logdet outputs `tensor(2.6688-2.5536j, dtype=torch.complex128)`

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
import numpy as np
t = np.array([[1 + 1j, 4 + 1j], [4 + 2j, 3 + 1j]])
tf_res = tf.linalg.logdet(tf.constant(t, dtype=tf.complex128))
torch_res = torch.logdet(torch.tensor(t))
print(tf_res, torch_res)
```
```


### Relevant log output

```shell
tf.Tensor(-inf, shape=(), dtype=float64) tensor(2.6688-2.5536j, dtype=torch.complex128)
```
Repository: youtube-dl
Issue: Please expand this tool to download facebook-reels also, we only can download fb watch.
Labels: request

<img width="1123" alt="Screenshot 2023-07-12 at 12 46 25" src="https://github.com/ytdl-org/youtube-dl/assets/79961919/f612e8d1-dfbd-466d-a9f9-9b7329073920">
Repository: ant-design
Issue: A way to access the attribute 'size' inside the setDefaultIndicator function of the Spin component so that I can change the height of the custom spin based on the size attribute.
Labels: Inactive

### What problem does this feature solve?

Spin.setDefaultIndicator(indicator: ReactNode)
There is no way to access the attribute 'size' of the Spin component inside the setDefaultIndicator(). so the custom spin we add will be of same size for all the value of the 'size' attribute in the Spin component. 

### What does the proposed API look like?

I expected it to be fixed like this.
setDefaultIndicator((props)=>{
       <Indicator 
              height={props.size == "small" ? '50px' : '10px'}
          >
})

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: opencv
Issue: Test_Darknet_nets.YOLOv4x_mish/0 sporadically fails with Vulkan backend
Labels: bug,category: dnn

### System Information

Platform: MacOS M1 + Vulkan

### Detailed description

```
[ RUN      ] Test_Darknet_nets.YOLOv4x_mish/0, where GetParam() = VKCOM/VULKAN
/Users/opencv-cn/GHA-OCV-3/_work/opencv/opencv/opencv/modules/dnn/test/test_common.impl.hpp:109: Failure
Value of: testClassIds.empty()
  Actual: true
Expected: false
No detections
Google Test trace:
/Users/opencv-cn/GHA-OCV-3/_work/opencv/opencv/opencv/modules/dnn/test/test_darknet_importer.cpp:974: batch size 1
[  FAILED  ] Test_Darknet_nets.YOLOv4x_mish/0, where GetParam() = VKCOM/VULKAN (2756 ms)
```

### Steps to reproduce

https://github.com/opencv/opencv/actions/runs/5523976890/jobs/10075638192?pr=23973

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: flutter
Issue: [go_router] Add StatefulShellBranches dynamically on app runtime
Labels: c: new feature,package,c: proposal,P2,p: go_router,team-go_router,triaged-go_router

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Our app consists of multiple modules. As we don't know which module is used by our users we need to create the StatefulShellBranches for our modules during runtime to preserve the state of each module and to also be able to navigate between them.

We discovered that it is possible to add new StatefulShellBranches to the StatefulShellRoute.indexedStack during runtime but they are never considered anymore during the runtime because the method "_branchLocation" of class "StatefulNavigationShellState" is only called once during the initialization. Therefore the newly added StatefulShellBranches is never added to the "_branchLocations" map and therefore the branches cannot be used.

We fixed it for our purpose by calling the method "_branchLocation" in the "build" method of the "StatefulNavigationShellState" class.

`@override
Widget build(BuildContext context) {
    final List<Widget> children = route.branches
        .map((StatefulShellBranch branch) => _BranchNavigatorProxy(
            key: ObjectKey(branch),
            branch: branch,
            navigatorForBranch: (StatefulShellBranch b) =>
                _branchNavigators[b.navigatorKey]))
        .toList();
    for(StatefulShellBranch branch in route.branches){
      _branchLocation(branch);
    }
    return widget.containerBuilder(context, widget, children);
  }`

It would be benefical to have a real solution for adding StatefulStateBranches during runtime.

### Proposal

Add the newly added StatefulShellBranches during runtime to the "_branchLocations" map.
Repository: tauri
Issue: [bug]wasi using println in build mode causes a unreachable error
Labels: type: bug,status: needs triage

### Describe the bug

I'm building the plugin using wasmedge and using println output in wasm, which works fine when run with cargo tauri dev, but not when run with cargo tauri build

### Reproduction

Here is a minimum repetition code. https://github.com/maoly1012/tauri-wasm-demo
step:
```
1. download the code.
2. cd tauri-wasm-demo
3. cargo build --target wasm32-wasi -p plugin 
4. cargo build --release pure-rust 
5. cd tauri-main & cargo tauri build
```
_The wasm application is very simple, just using println! to output the "hello from plugin"_
```
#[allow(unused)]
use wasmedge_bindgen::*;
#[wasmedge_bindgen_macro::wasmedge_bindgen]
pub fn hello(){
    println!("hello from plugin");
}
```
pure rust run:
1. cd ../target/release 
2. ./pure-rust.exe 
ouput: 
```
hello from plugin
message:Run init Ok
```

tauri run:

1. ./tauri-main.exe
2. click the Greet button
output on the page:
```
unreachable is displayed
```


### Expected behavior

_No response_

### Platform and versions

```text
Environment
  › OS: Windows 10.0.22621 X64
  › Webview2: 114.0.1823.67
  › MSVC: 
      - Visual Studio Community 2022
  › Node.js: 16.11.1
  › npm: 8.0.0
  › pnpm: 6.11.0
  › yarn: 1.22.11
  › rustup: 1.26.0
  › rustc: 1.70.0
  › cargo: 1.70.0
  › Rust toolchain: stable-x86_64-pc-windows-msvc
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: create-react-app
Issue: React-scripts using old version of jest that internally have dependency on vulnerable package 
Labels: needs triage,issue: bug report

### Describe the bug

Found an dependency used by react-scrips have a dependency that have vulnerability that we found through blackduck scan. react-scripts have **"jest": "^27.4.3"** dependency that internally have dependency on **tough-cookie : 4.0.0**. this version of tough-cookie have a vulnerability. 
As 5.0.1 is the latest version of react scripts that we can use the hope that we have from you is that to increase the version of jest. 
https://security.snyk.io/vuln/SNYK-JS-TOUGHCOOKIE-5672873

### Expected behaviour 
increase the version of jest version 28.0.0 any newer version OR  When can we expect this changed, or it is not possible soon.
Repository: kubernetes
Issue: expect kubelet retry to alloc resource when device plugin restart
Labels: kind/bug,sig/node,priority/important-longterm,triage/accepted

### What happened?

when device plugin restart. pod create failed with reason UnexpectedAdmissionError

### What did you expect to happen?

kubelet retry to wait device plugin restart, to let the pod create success

### How can we reproduce it (as minimally and precisely as possible)?

1. prepare device plugin report resource.
2. create pod, at the same time, device plugin restart.

### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
$ kubectl version
# paste output here
```

</details>


### Cloud provider

<details>

</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>
Repository: opencv
Issue: Unexpected Results with MatExpr and operator+=
Labels: bug,category: core

### System Information

OpenCV version 4.7.0 (also checked for 4.x)
Operating System: Debian Bullseye (self-built OpenCV)
Compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110


### Detailed description

Given following example code:

```c++
  auto a = cv::Mat1f::ones(3, 3);
  a += cv::Mat1f::ones(3, 3);
  std::cout << static_cast<cv::Mat1f>(a)(0, 0) << std::endl;  // is expected to print 2 but actually prints 1.
```

Curiously, the `operator+=` will return the sum as expected, however, the return value of `operator+=` is mostly discarded, so that's not really intuitive to use.

The documentation about `operator+=` on `cv::Mat*` is virtually not existent.

Is there a reason for such weird behavior?
It should be changed to what we expect from `operator+=`, so that it can be used as a shortcut for `operator+`, or at least properly documented.

There is, BTW, no overload for `operator+=` for `cv::MatExpr`, hence I'd actually would expect that the example didn't compile (which would be preferred over such weird behavior).
However, it seems that there exists some implicit cast to `cv::Mat` that enables some overload.

### Steps to reproduce

```c++
  auto a = cv::Mat1f::ones(3, 3);
  a += cv::Mat1f::ones(3, 3);
  std::cout << static_cast<cv::Mat1f>(a)(0, 0) << std::endl;  // is expected to print 2 but actually prints 1.
```

```c++
  cv::Mat1f a = cv::Mat1f::ones(3, 3);  // don't use MatExpr here and ...
  a += cv::Mat1f::ones(3, 3);
  std::cout << a(0, 0) << std::endl;  // ... it does what we expect
```

```c++
  auto a = cv::Mat1f::ones(3, 3);  
  a = a + cv::Mat1f::ones(3, 3);  // don't use `operator+=` and ...
  std::cout << static_cast<cv::Mat1f>(a)(0, 0) << std::endl;  // ... it does what we expect
```

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: electron
Issue: Child windows are not destroyed when the parent is destroyed on macOS
Labels: platform/macOS,status/confirmed,component/BrowserWindow

At the moment, there's platform inconsistency when calling `destroy()` on a BrowserWindow with one or more children.

On macOS, the child windows are left intact and can be reparented, while on Windows and Linux, the child windows are destroyed. As with `window.close()`, it should be the case that tearing down a root window results in its children being destroyed.

Reproducible with https://gist.github.com/3b45265f63e8ebfd233665989b81cdab
Repository: next.js
Issue: useSearchParams and nested Layouts break loading of static assests
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: linux
      Arch: x64
      Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023
    Binaries:
      Node: 18.14.2
      npm: 9.5.0
      Yarn: 1.22.19
      pnpm: N/A
    Relevant Packages:
      next: 13.4.10-canary.4
      eslint-config-next: 13.4.8
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.0.4
    Next.js Config:
      output: N/A
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App Router

### Link to the code that reproduces this issue or a replay of the bug

https://codesandbox.io/p/sandbox/fancy-microservice-fc28gl?file=%2Fapp%2Fwith%2Fpage.tsx%3A11%2C1

### To Reproduce

1. Navigate to the route `/without` -> the alert.js is served and the browser shows the alert message
2. Navigate to the route `/with` -> the alert.js is not served and the browser does not show the alert message

### Describe the Bug

Hi everyone,

I've encountered a problem with useSearchParams and nested layouts: When loading static assets in a page which accesses search params the asset is not loading. Please see the CodeSandbox to reproduce it. Thanks!



### Expected Behavior

Both routes should load the alert.js and display the alert message 

### Which browser are you using? (if relevant)

Chrome Version 114.0.5735.199

### How are you deploying your application? (if relevant)

`npm run start` (edit)