sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: electron
Issue: [Bug]: showItemInFolder hangs macOS Finder for about a minute
Labels: platform/macOS,bug :beetle:,status/confirmed,has-repro-gist,component/shell,29-x-y,30-x-y,31-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

25.0.1

### What operating system are you using?

macOS

### Operating System Version

macOS Ventura 13.4

### What arch are you using?

x64

### Last Known Working Electron version

24.4.0

### Expected Behavior

```javascript
import { shell } from "electron";

shell.showItemInFolder("/path/to/file.ext");
```
This should open the folder and highlight the file in it

### Actual Behavior

In **renderer** process it leads to Finder's "Not Responding" state for about a minute, and then it show the file. Meanwhile in **main** process it works as expected

### Testcase Gist URL

https://gist.github.com/Nesvet/8700b509a57043453b1e6e027cc0c85e

### Additional Information

_No response_
Repository: go
Issue: crypto: only partial validation of Hash argument in RegisterHash
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.19.1 darwin/amd64
# but please note that it's not relevant, since I'm providing references and links to go1.20.4 below.
</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
GOARCH="amd64"
GOOS="darwin"
# other values are irrelevant in this case
</pre>
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->


Browsing [`src/crypto/crypto.go`](https://cs.opensource.google/go/go/+/refs/tags/go1.20.4:src/crypto/crypto.go), I've noticed that [`RegisterHash`](https://cs.opensource.google/go/go/+/refs/tags/go1.20.4:src/crypto/crypto.go;drc=19309779ac5e2f5a2fd3cbb34421dafb2855ac21;l=145) doesn't not validate the [`Hash`](https://cs.opensource.google/go/go/+/refs/tags/go1.20.4:src/crypto/crypto.go;drc=19309779ac5e2f5a2fd3cbb34421dafb2855ac21;l=16) argument in the same fashion as the rest of the package.

### What did you expect to see?
I expected `RegisterHash` to validate that the `Hash` argument is bigger than 0, as the smallest `Hash` value defined in the package is `uint 1` (`MD4`, which is defined with `1 + iota`).
I though it's this way intentionally ...


### What did you see instead?
Digging in a bit more, and trying to find an explanation or a legit use, I failed, leading me to believe that it's not intentional.
I might be wrong, since I'm not super experienced with the package, but I expect to see a comment addressing the exceptional check if it was by design.
Repository: godot
Issue: The multiplayer instance isn't currently active
Labels: bug,confirmed,topic:multiplayer

### Godot version

4.0.3

### System information

Windows 11

### Issue description

When starting the game (multiplayer server not started), if do "print (is_multiplayer_authority())" gives "True", but after server_custom.close () (close the server) an error starts to appear "The multiplayer instance isn't currently active". Thus, all further calls to network functions begin to produce errors. Thus, if a player after a network game wants to go into a single player game, the game will spam errors. If he starts a single player game right away, there will be no errors.
This problem occurs not only with "is_multiplayer_authority()", but also with some other network functions or nodes.

I think is_multiplayer_authority() should either throw an error right away (it returns true now before the server is created, as if Godot is running the server by default) or not throw any errors after the server is closed. The second option is much more preferable. I hope I managed to explain the problem. 




### Steps to reproduce

Before starting the server, check "print (is_multiplayer_authority())", then start the server, close it and check again

### Minimal reproduction project

```gdscript
var server_custom = ENetMultiplayerPeer.new()

func _ready():
	print (is_multiplayer_authority())
	server_custom.create_server(4530, 9)
	multiplayer.multiplayer_peer = server_custom
	server_custom.close()
	print (is_multiplayer_authority())
```
Repository: rust
Issue: Weird codegen / constant folding with iterators of length > 101
Labels: A-LLVM,I-slow

Hi,
When playing with some of my code on compiler explorer, I found a case where rust would not compute the result of some functions at compile time. I managed to reduce the code to the following:
```rust
pub fn test() -> i32 {
    let mut s = 0;

    for i in 0..102 {
        if i == 0 {
            s = i;
        }

        s += 1;
    }

    s
}

pub fn test2() -> i32 {
    let mut s = 0;

    for i in 0..101 {
        if i == 0 {
            s = i;
        }

        s += 1;
    }

    s
}

pub fn test3() -> i32 {
    let mut s = 0;

    for _ in 0..102 {
        s += 1;
    }

    s
}
```
[compiler explorer link](https://godbolt.org/z/d6YaYs1We)

Both `test2` and `test3` are completely optimized and are compiled down to a singled "mov constant + ret" combo. But the `test` function generates something quite convoluted: the compiler loads the result (`102`) and removes `6` from it until it reaches `0`, at which point it returns the value of another register to which `6`s have been added at each step.

I tried a few versions of rustc but couldn't find any which completely optimized away the first function. Using `mir-opt-level` didn't help.
Repository: flutter
Issue: `SearchAnchor.bar`'s `openView` break composing text.
Labels: a: text input,framework,f: material design,a: internationalization,a: typography,has reproducible steps,P2,found in release: 3.10,found in release: 3.11,team-design,triaged-design

### 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)

### Steps to reproduce

Input some composing text in `SearchAnchor.bar`, `openView` will be triggered by `onChange`. Then the composing text will not restore in new TextFiled. By reading source code and debugging, I believe it reads `TextEdtingValue` (which contains [composing](https://api.flutter.dev/flutter/services/TextEditingValue/composing.html) property) from `SearchAnchor.bar` and set it to `SearchBar`. So I suppose that the composing text should be kept, but it was not.

### Code sample

see https://github.com/sun-jiao/flutter/blob/master/examples/api/lib/material/search_anchor/search_anchor.3.dart

change line 49 to `SearchAnchor.bar()`

### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

[Upload media here](https://github.com/flutter/flutter/assets/14086980/093cd1cd-b772-495b-bb21-0b46250c0c7c)

</details>


### Logs

_No response_

### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.2, on Fedora Linux 38 (Workstation Edition)
    6.2.15-300.fc38.x86_64, locale zh_CN.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2022.2)
[!] Proxy Configuration
    ! NO_PROXY does not contain ::1
[✓] Connected device (3 available)
[!] Network resources
    ✗ A network error occurred while checking "https://pub.dev/": Connection reset by peer

! Doctor found issues in 2 categories.
```

</details>
Repository: ant-design
Issue: Drawer scroll lock not working when getContainer is specified
Labels: Inactive,unconfirmed

https://codesandbox.io/s/ji-chu-chou-ti-antd-5-5-2-forked-d12uv8?file=/demo.tsx

Drawer 打开后，页面还是能滚动。期待应该是无法滚动。

<img width="725" alt="图片" src="https://github.com/ant-design/ant-design/assets/507615/7e76d08b-a319-4bea-84a3-012c1d75e5c1">


对比一下没有 getPopupContainer 的效果：https://codesandbox.io/s/ji-chu-chou-ti-antd-5-5-2-forked-49f0q6?file=/demo.tsx
Repository: vscode
Issue: Display disabled tasks in Run Build Task... menu
Labels: feature-request,tasks

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

I would like a method to display build tasks, that are temporarily unavailable. eg A build task that cannot be run because something else in happening in your workspace that would clash with the build.

Maybe add a disabled flag to `vscode.Task` which could be set in the individual tasks you return from `TaskProvider.provideTasks` when you want the task to be visible but not actionable.

An alternative is to list tasks with no `execution` set as disabled, but that would be a change of behaviour which might be less desirable.
Repository: electron
Issue: [Feature Request]: Native file drag and drop needs to support maintaining directory structure
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

document api：
https://www.electronjs.org/docs/latest/api/web-contents#contentsstartdragitem

contents.savePage(fullPath, saveType)
fullPath string - The absolute file path.
saveType string - Specify the save type.
HTMLOnly - Save only the HTML of the page.
HTMLComplete - Save complete-html page.
MHTML - Save complete-html page as MHTML.


Requirement: This api is troublesome to support the parameters of maintaining the directory structure.



### Proposed Solution

contents.savePage(fullPath, saveType) Please support to keep the file directory structure after dragging and copying

### Alternatives Considered

contents.savePage(fullPath, saveType) Please support to keep the file directory structure after dragging and copying

### Additional Information

contents.savePage(fullPath, saveType) Please support to keep the file directory structure after dragging and copying
Repository: storybook
Issue: [Docs] The limitations of the Canvas Doc Block in v7 are not fully described
Labels: documentation

### Discussed in https://github.com/storybookjs/storybook/discussions/22587

<div type='discussions-op-text'>

<sup>Originally posted by **hieucd04** May 17, 2023</sup>
In storybook 6, I can do this:

```
<Canvas withSource={SourceState.CLOSED}>
    <Story name="Sizes">
        <Label style={Variant.Small}>Small</Label>
        <Label style={Variant.Medium}>Medium</Label>
        <Label style={Variant.Large}>Large</Label>
    </Story>
</Canvas>
```

![image](https://github.com/storybookjs/storybook/assets/89077642/03f0b6e0-f791-4257-bc44-d805a4bc8df3)

What I did was that I put 3 `<Label>` components inside a single `<Canvas>`.

---
In storybook 7, the recommended way is to use `of` props. But the `of` props doesn't accept array. It only accepts a single story.
So, in storybook 7, how do I put multiple components inside a single `<Canvas>` ?</div>
Repository: opencv
Issue: c++ crst tracker init core dumbed error
Labels: bug

### System Information

OpenCV version: 4.6.0
Operating System / Platform: Ubuntu 20.04
Compiler & compiler version: GCC 9.3.0

I am working on c++ with opencv and i want to use csrt. But it is throwing error core dumbed when i was calling init function. Could you help me ? 




### Detailed description



#include <opencv2/opencv.hpp>
#include <opencv2/tracking.hpp>
#include <opencv2/core/ocl.hpp>
#include <opencv2/tracking/tracking_legacy.hpp>
using namespace cv;
using namespace std;
 

#define SSTR( x ) static_cast< std::ostringstream & >( \
( std::ostringstream() << std::dec << x ) ).str()
 
int main(int argc, char **argv)
{
    // List of tracker types in OpenCV 3.4.1
    string trackerTypes[8] = {"BOOSTING", "MIL", "KCF", "TLD","MEDIANFLOW", "GOTURN", "MOSSE", "CSRT"};
    // vector <string> trackerTypes(types, std::end(types));
 
    // Create a tracker
    string trackerType = "CSRT";
 
    
    
    Ptr<legacy::TrackerCSRT> tracker = cv::legacy::TrackerCSRT::create();



    // Read video
    VideoCapture video(0);
     
    // Exit if video is not opened
    if(!video.isOpened())
    {
        cout << "Could not read video file" << endl; 
        return 1; 
    } 
 
    // Read first frame 
    Mat frame; 
    bool ok = video.read(frame); 
 
    // Define initial bounding box 
    Rect2d bbox(287, 23, 86, 320); 
 
    // Uncomment the line below to select a different bounding box 
    // bbox = selectROI(frame, false); 
    // Display bounding box. 
    rectangle(frame, bbox, Scalar( 255, 0, 0 ), 2, 1 ); 
 
    imshow("Tracking", frame); 
    tracker->init(frame, bbox);  // core dumbed error !


### Steps to reproduce

https://docs.opencv.org/4.x/d0/d20/classcv_1_1legacy_1_1TrackerMOSSE.html

### 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
- [ ] I updated to the latest OpenCV version and the issue is still there
- [ ] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: stable-diffusion-webui
Issue: [Bug]: memory leak in inpaint sketch
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

inpaint sketch uses up all the RAM and locks up the browser

### Steps to reproduce the problem

1. load image into img2img tab
2. press inpaint sketch


### What should have happened?

memory usage unchanged

### Commit where the problem happens

644ebe39a95c60e08e1f1c3e536f1aa1936d0cec7fa26617db0d50a1cfe8c13c

### What Python version are you running on ?

Python 3.10.x

### What platforms do you use to access the UI ?

Windows

### What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

### What browsers do you use to access the UI ?

Microsoft Edge

### Command Line Arguments

```Shell
No
```


### List of extensions

a1111-sd-webui-tagcomplete, loopback_scaler, openpose-editor, sd-webui-controlnet, stable-diffusion-webui-model-toolkit, ultimate-upscale-for-automatic1111














### Console logs

```Shell
no output of note
```


### Additional information

https://imgur.com/a/SjikmUc
Repository: neovim
Issue: `listchar` highlight and `:syn` highlight mixed up
Labels: bug,needs:discussion,syntax,highlight

### Problem

`listchar` highlight and `:syn` highlight are mixed up.

### Steps to reproduce

```
nvim --clean -S <(tee <<'EOF'
    set list listchars=trail:-
    call setline(1, '   ')
    syn match Bold "^.*$"
    hi Bold cterm=bold
    hi Whitespace cterm=NONE ctermfg=red ctermbg=NONE " nvim uses this
    hi SpecialKey cterm=NONE ctermfg=red ctermbg=NONE " vim uses this
EOF
)
```
The `-` characters for trailing whitespace are bold, while it shouldn't be.
![image](https://github.com/neovim/neovim/assets/19489738/30715f55-8dca-44b8-b0ca-ece00dcc67c3)



### Expected behavior

![image](https://github.com/neovim/neovim/assets/19489738/4c00e09b-5e49-458c-92e8-42a3c99bb4df)
(vim 9.0.1580)

### Neovim version (nvim -v)

0.10-dev 68e2d722959dadc596edb9320bcdede38659db07

### Vim (not Nvim) behaves the same?

no, vim 9.0.1580

### Operating system/version

ubuntu 22.04

### Terminal name/version

GNOME Terminal 3.44.0 using VTE 0.68.0 +BIDI +GNUTLS +ICU +SYSTEMD

### $TERM environment variable

tmux-256color

### Installation

ubuntu ppa
Repository: pytorch
Issue: Best practices clarification for initialization strategies
Labels: module: nn,triaged,module: initialization,needs research,module: python frontend

### 📚 The doc issue

PyTorch provides a few initialization strategies. However, changing the default (Xavier), while made easier via the `nn.init` submodule, can result in code duplication. Is it worthwhile to introduce decorators to more easily define new layers / redefine existing layers?

```python
import torch.nn as nn
from typing import (TypeAlias, List, TypeVar)

TorchLayer: TypeAlias = nn.Module


def apply_init_to_layer(
    torch_layer:TorchLayer, init_func:Callable[[TorchLayer], TorchLayer],
    *args, **kwargs
):
    layer = torch_layer(*args, **kwargs)
    layer.apply(init_func)
    return layer

def apply_kaiming_init(layer:TorchLayer):
    for name, param in layer.named_parameters():
        if 'weight' in name:
            nn.init.kaiming_normal_(param.data)
        elif 'bias' in name:
            param.data.fill_(0)

def apply_xavier_init(layer:TorchLayer):
    for name, param in layer.named_parameters():
        if 'weight' in name:
            nn.init.xavier_normal_(param.data)
        elif 'bias' in name:
            param.data.fill_(0)

def kaiming_init(torch_layer:TorchLayer) -> Callable[..., TorchLayer]:
    def init_layer(*args, **kwargs) -> TorchLayer:
        layer = apply_init_to_layer(torch_layer, apply_kaiming_init, *args, **kwargs)
        return layer
    return init_layer
```

with existing layers:

```python
kLSTM = kaiming_init(nn.LSTM)
kGRU = kaiming_init(nn.GRU)
kLinear = kaiming_init(nn.Linear)
```



### Suggest a potential alternative/fix

See above

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
Repository: go
Issue: x/pkgsite: adding a package via request button description is misleading
Labels: NeedsDecision,pkgsite

### What is the URL of the page with the issue?
 https://pkg.go.dev/about#adding-a-package
 
 
### What is your user agent?
 Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36

 
### What did you do?
Tried to follow the first variant for adding a package, which says:

    Visiting that page on pkg.go.dev, and clicking the “Request” button. For example:
    https://pkg.go.dev/example.com/my/module

 Went to a couple of those modules and searched for the "Request" button
  * https://pkg.go.dev/github.com/anacrolix/log
  *  https://pkg.go.dev/github.com/csaf-poc/csaf_distribution
  * https://pkg.go.dev/github.com/pmezard/go-difflib/difflib

Could not find the "Request" button.
 
### What did you expect to see?
 
That any url that matches the example URL of the documentation works like it is written there and offers a "Request" button.

Or that the documentation tells me instead, under which conditions the button should appear.
 
Or the documentation is corrected to remove this possibility, if it is gone by now.


### What did you see instead?

Searching "Request" on the pages did yield results.
Repository: kubernetes
Issue: Use `secrets` field in `NodePublishVolumeRequest` for sa tokens
Labels: kind/bug,sig/storage,sig/security,triage/accepted

If the `TokenRequests` field is set in the `CSIDriver` spec, the tokens are generated and funneled from kubelet to driver as part of volume attributes map. The key for the tokens in the map is `csi.storage.k8s.io/serviceAccount.tokens`.  The service account tokens can be used for workload identity in cloud providers. Especially in case of Secrets Store CSI Driver, these service account tokens are used to access external secrets store to get secrets and mount in the volume. 

As these tokens are sensitive information, it doesn't feel right to include these in the volume context map along with pod name, namespace, service account name which are non-sensitive information. There is a dedicated [secrets field in the proto](https://github.com/container-storage-interface/spec/blob/master/lib/go/csi/csi.pb.go#L4063-L4066) which today is being used for `nodePublishSecretRef` that would be more appropriate for tokens.

To provide more context on "why this issue", we had a CVE in the Secrets Store CSI Driver (ref: [CVE-2023-2878](https://github.com/kubernetes-sigs/secrets-store-csi-driver/security/advisories/GHSA-g82w-58jf-gcxx)) where the service account tokens were logged as part of the GRPC request in the driver. We use the [protosanitizer](https://github.com/kubernetes-csi/csi-lib-utils/blob/master/protosanitizer/protosanitizer.go) in the driver to sanitize the requests before logging but given volume context is not really considered a "secret", the tokens were skipped and logged. We got around this by building custom logic for logging in the driver to strip the tokens but this is something every driver would need to do to be careful and not log the tokens. A change could be made in protosanitizer to sanitize this but given volume context is a map, either entire map needs to be marked a secret or sanitizing has to be done on a field by field basis. Although this prompted me to create this issue, I think volume context is not really "secrets" and appropriate field for sensitive sa tokens would be the secrets field.

/sig storage