sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Incorrect explanation for upvar move in FnMut closure
Labels: A-diagnostics,T-compiler

<!--
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.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=ffd0246c53be868166cd6d6ee0b9b726)):

```rust
fn use_mut(_: impl FnMut()) {}
fn main() {
    let mut upvar = Some(String::new());
    use_mut(move || {
        || {
            || {
                upvar.take();
                if let Some(_s) = upvar {}
            };
        };
    });
}
```

The current output is:

```
error[E0507]: cannot move out of `upvar`, a captured variable in an `FnMut` closure
  --> src/main.rs:5:9
   |
3  |       let mut upvar = Some(String::new());
   |           --------- captured outer variable
4  |       use_mut(move || {
   |  _____________-
5  | |         || {
   | |         ^^ move out of `upvar` occurs here
6  | |             || {
7  | |                 upvar.take();
   | |                 -----
   | |                 |
   | |                 variable moved due to use in closure
   | |                 move occurs because `upvar` has type `Option<String>`, which does not implement the `Copy` trait
...  |
10 | |         };
11 | |     });
   | |_____- captured by this `FnMut` closure
```

The error is correct, but the diagnostic points to `upvar.take()` as the reason why the value is moved, while the real culprit is the match expression `if let Some(_s) = upvar {}`, which is not indicated.

Occurs in 1.63.0 stable and `1.65.0-nightly (2022-08-16 86c6ebee8fa0a5ad1e18)`.
Repository: pytorch
Issue: Improve FSDP error msg on wrong attr access
Labels: oncall: distributed,module: bootcamp,triaged,pt_distributed_rampup,module: fsdp

### 🚀 The feature, motivation and pitch

If FSDP does not have an attr, it will dispatch into the contained module to try to get the attribute. However if this fails, the error raised is confusing, since it prints out a msg containing info about the wrapped module not having the attribute, instead of the FSDP module. An example:

```
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/fsx/users/rvarm1/rvarm1/repos/pytorch/torch/testing/_internal/common_distributed.py", line 622, in run_test
    getattr(self, test_name)()
  File "/fsx/users/rvarm1/rvarm1/repos/pytorch/torch/testing/_internal/common_distributed.py", line 503, in wrapper
    fn()
  File "/fsx/users/rvarm1/rvarm1/repos/pytorch/torch/testing/_internal/common_distributed.py", line 145, in wrapper
    return func(*args, **kwargs)
  File "/fsx/users/rvarm1/rvarm1/repos/pytorch/test/distributed/fsdp/test_fsdp_misc.py", line 150, in test_fsdp_not_all_outputs_used_in_loss
    loss.backward()
  File "/fsx/users/rvarm1/rvarm1/repos/pytorch/torch/_tensor.py", line 484, in backward
    torch.autograd.backward(
  File "/fsx/users/rvarm1/rvarm1/repos/pytorch/torch/autograd/__init__.py", line 191, in backward
    Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
  File "/fsx/users/rvarm1/rvarm1/repos/pytorch/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/fsx/users/rvarm1/rvarm1/repos/pytorch/torch/distributed/fsdp/fully_sharded_data_parallel.py", line 2880, in _post_backward_hook
    if self._should_free_full_params():
  File "/fsx/users/rvarm1/rvarm1/repos/pytorch/torch/distributed/fsdp/fully_sharded_data_parallel.py", line 3483, in _should_free_full_params
    self.sharding_stratagy == ShardingStrategy.FULL_SHARD
  File "/fsx/users/rvarm1/rvarm1/repos/pytorch/torch/distributed/fsdp/fully_sharded_data_parallel.py", line 1536, in __getattr__
    return getattr(self._fsdp_wrapped_module, name)
  File "/fsx/users/rvarm1/rvarm1/repos/pytorch/torch/distributed/fsdp/flatten_params_wrapper.py", line 146, in __getattr__
    return getattr(self.module, name)  # fall back to the wrapped module
  File "/fsx/users/rvarm1/rvarm1/repos/pytorch/torch/nn/modules/module.py", line 1260, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Linear' object has no attribute 'sharding_stratagy'
```

In this case, we have a typo `sharding_stratagy` but it is harder to debug since the error `AttributeError: 'Linear' object has no attribute 'sharding_stratagy'` is misleading. We should improve this to include information about `FullyShardedDataParallel`. 

### Alternatives

_No response_

### Additional context

_No response_

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @kwen2501 @ezyang
Repository: ant-design
Issue: segmented 白色文字，深色背景，切换有延迟
Labels: 🐛 Bug,Inactive,👷🏻‍♂️ Someone working on it

### Reproduction link


### Steps to reproduce


https://user-images.githubusercontent.com/7971419/186079718-55d1058e-9004-42f8-8bb5-2b7829971e1b.mp4



### What is expected?



### What is actually happening?



| Environment | Info |
| --- | --- |
| antd | 4.22.7 |
| React | latest |
| System | mac |
| Browser | chrome |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: PowerToys
Issue: Fancy Zones with option to Add a Label
Labels: Idea-Enhancement,Product-FancyZones,Needs-Triage

### Description of the new feature / enhancement

I usualy use Fancy Zones to split the screen with 2 zones each one about certain Server.
As I use same App on both Zones... sometimes I doubt wich Zone is for wich Server.

If I could Add a top Label or lateral label outside each Fancy Zone this little label will acts as a Visual Clue about wich Zone of for wich server.

### Scenario when this would be used?

Sometimes we need open twice same App and each App has different context. 
If each Fancy Zone could have a top or lateral label (with or without a outside box) I could differenciate each context for the same App opened twice.


### Supporting information

_No response_
Repository: vscode
Issue: Tabs API does not allow to identify internal tabs
Labels: feature-request,api,workbench-tabs


Type: <b>Bug</b>

If you set a listener to `vscode.window.tabGroups.onDidChangeTabs`, you will only get an `undefined` for `tab.input` when switching to the "Settings" or the "Keyboard Shortcuts".

```
vscode.window.tabGroups.onDidChangeTabs((tabs) => {
    if (tabs.changed.length) {
        tabs.changed.forEach(tab => {
            console.log(tab.input);
        })
    }
});
```

Since the tab object does not contain any meaningful usable indication of what the user is actually looking at (except for the `label`, which is language dependent though), it is not possible to build a complete replacement for the "Open Editors" panel.
Here an internal uri object (with `path: "vscode://settings"`) would be useful, so that one can open the tab via `vscode.open` as with all other tab items.

VS Code version: Code 1.70.2 (e4503b30fc78200f846c62cf8091b76ff5547662, 2022-08-16T05:35:13.448Z)
OS version: Windows_NT x64 10.0.22000
Modes:
Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i3-8130U CPU @ 2.20GHz (4 x 2208)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_renderer: enabled_on<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|7.91GB (0.49GB free)|
|Process Argv|--crash-reporter-id f99464a5-8822-46d7-a621-d6395d9680b9 --crash-reporter-id f99464a5-8822-46d7-a621-d6395d9680b9|
|Screen Reader|no|
|VM|0%|

|Item|Value|
|---|---|
|Remote|WSL: Ubuntu|
|OS|Linux x64 5.10.16.3-microsoft-standard-WSL2|
|CPUs|Intel(R) Core(TM) i3-8130U CPU @ 2.20GHz (4 x 2207)|
|Memory (System)|3.79GB (0.66GB free)|
|VM|0%|
</details>
<!-- generated by issue reporter -->
Repository: flutter
Issue: Enable shrinking for Android builds with deferred components
Labels: c: new feature,platform-android,tool,t: gradle,c: proposal,P2,team-android,triaged-android

When deferred components is setup, this message appears in the logs: `Shrinking has been disabled for this build due to deferred components. Shrinking is not available for multi-apk applications. This limitation is expected to
be removed when Gradle plugin 4.2+ is available in Flutter.` (E.g. flutter/gallery app)

We should re-enable shrinking.
Repository: godot
Issue: The new terrain system doesn't match full 3x3 bitmasks
Labels: enhancement,discussion,topic:core,confirmed,topic:2d

### Godot version

v4.0.alpha14

### System information

Windows 11

### Issue description

The new terrain system doesn't seem to match 3x3 full bitmasks, only 3x3 minimal as shown in the image below:

![image](https://user-images.githubusercontent.com/5214414/186100393-b2438d96-6509-434c-96db-45247c8dce6b.png)

The correct functionality is present in Godot 3.5

### Steps to reproduce

1. Make a TileSet with the full 256 terrain bitmasks (it takes a while 😨)
2. Try drawing an X shape with the terrain tool
3. The center square is incorrectly a single tile 

(This happens with many other shapes that should match too)

### Minimal reproduction project

[3x3full.zip](https://github.com/godotengine/godot/files/9400385/3x3full.zip)
Repository: youtube-dl
Issue: Add the commentsCount info about youtube video.
Labels: request,patch-available



## question
 Currently, there wasn't commentsCount info about youtube video.


## suggest
  The commentsCount info was in ytinitialData, but the youtubeIE hasn't regex about ytinitialData and getYtInitialData. Can you consider to add a function or regex to get ytinitialData.
Repository: terminal
Issue: [Terminal]: 3 unnecessary numbers are appearing on Terminal app Header when user use 'Show numbers' command.
Labels: Issue-Bug,Area-Accessibility,Product-Terminal,Priority-3,HCL-E+D,A11yWCAG,HCL-WindowsTerminal,A11yCO,A11ySev3,Disability-Mobility

### Windows Terminal version

1.15.2003.0

### Windows build number

10.0.25179.1000

### Other Software

**Test Environment:**
OS: Window 11 22H2 OS Build 25179.1000
App: Windows Terminal Preview
AT: Voice Access

### Steps to reproduce

**Repro Steps:**
1. Open Windows Terminal.
2. Open Voice Access AT.
3. Use 'Show numbers' command and observe the issue.

**User Experience:**
People with limited mobility who use Voice Access will have bad UX as extra numbers might disorient them because those numbers are appearing beside other necessary numbers.

**Guideline Reference:**
EN 301 549 V3.2.1: 11.06.02 No disruption of accessibility features

**Attachments:**
[Unnecessary numbers.zip](https://github.com/microsoft/terminal/files/9400501/Unnecessary.numbers.zip)

Attachment Note: Not able to inspect Terminal Preview app with AI and Inspector tool.

### Expected Behavior

Unnecessary numbers should not appear on Terminal app Header when user use 'Show numbers' command.

### Actual Behavior

3 unnecessary numbers are appearing on Terminal app Header when user use 'Show numbers' command. On saying each number nothing happens.

To learn more about Voice Access and how an application can support its different modes, Refer https://www.osgwiki.com/wiki/VoiceAccess_Testing

Voice Access Commands page: https://sway.office.com/Q5JvoIGBI5glyoKw?ref=Link
Repository: pytorch
Issue: pytorch 1.12.1 Adam Optimizer Malfunction!!!
Labels: needs reproduction,module: optimizer,triaged

If you have a question or would like help and support, please ask at our
[forums](https://discuss.pytorch.org/).

If you are submitting a feature request, please preface the title with [feature request].
If you are submitting a bug report, please fill in the following details.

## Issue description

Provide a short description.
In pytorch 1.12.1, Adam optimization doesn't work well.
I think, It seems that the internal behavior has changed as the version is upgraded, please check 

## Code example

Please try to provide a minimal example to repro the bug.
Error messages and stack traces are also helpful.

## System Info
Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

- PyTorch 
- How you installed PyTorch Conda
- Build command you used (if compiling from source):
- OS: window10, Ubuntu 18.04
- PyTorch version: 1.12.1
- Python version: 3.8.0
- CUDA/cuDNN version: Cuda11.3
- GPU models and configuration: gtx1080ti, gtx3070
- GCC version (if compiling from source):
- CMake version:
- Versions of any other relevant libraries:


cc @vincentqb @jbschlosser @albanD
Repository: pytorch
Issue: Bug in batch names with matmul (result tensor has names=('i', 'i', 'k')).
Labels: triaged,module: named tensor

### 🐛 Describe the bug

The following code should fail, as it gives duplicate names in the output.  
```
A = t.ones((3,3), names=('i', 'j'))
B = t.ones((3,3,3), names=('i', 'j', 'k'))
print((A@B).names)
```
Instead, it gives duplicated names (which is not allowed e.g. in the named constructors):
```
('i', 'i', 'k')
```
I'm on PyTorch version 1.12.1 on CPU.

### Versions

Collecting environment information...
PyTorch version: 1.12.1
Is debug build: False
CUDA used to build PyTorch: 11.3
ROCM used to build PyTorch: N/A

OS: CentOS Linux release 7.9.2009 (Core) (x86_64)
GCC version: (GCC) 9.3.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.17

Python version: 3.9.12 (main, Apr  5 2022, 06:56:58)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-3.10.0-1160.45.1.el7.x86_64-x86_64-with-glibc2.17
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.5
[pip3] numpydoc==1.2
[pip3] torch==1.12.1
[pip3] torchaudio==0.12.1+cu113
[pip3] torchvision==0.13.1+cu113
[conda] blas                      1.0                         mkl
[conda] cudatoolkit               11.3.1               h2bc3f7f_2
[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch
[conda] mkl                       2021.4.0           h06a4308_640
[conda] mkl-service               2.4.0            py39h7f8727e_0
[conda] mkl_fft                   1.3.1            py39hd3c417c_0
[conda] mkl_random                1.2.2            py39h51133e4_0
[conda] numpy                     1.21.5           py39he7a7128_1
[conda] numpy-base                1.21.5           py39hf524024_1
[conda] numpydoc                  1.2                pyhd3eb1b0_0
[conda] pytorch                   1.12.1          py3.9_cuda11.3_cudnn8.3.2_0    pytorch
[conda] pytorch-mutex             1.0                        cuda    pytorch
[conda] torchaudio                0.12.1+cu113             pypi_0    pypi
[conda] torchvision               0.13.1+cu113             pypi_0    pypi

cc @zou3519
Repository: rust
Issue: LLVM miscompiles large stack allocations
Labels: A-LLVM,P-high,T-compiler,I-unsound,C-bug,WG-llvm,I-miscompile

I tried this code:

```Rust
use std::thread;

const KILO: usize = 1024;
const MEGA: usize = 1024 * KILO;
const GIGA: usize = 1024 * MEGA;

const BUFFER_SIZE: usize = 4 * GIGA;
const REQUIRED_STACK_SIZE: usize = 512 * MEGA + BUFFER_SIZE;

fn main() {
    thread::Builder::new()
        .stack_size(REQUIRED_STACK_SIZE)
        .spawn(perform_double_free).unwrap()
        .join().unwrap();
}

fn perform_double_free() {
    make_noise();
    let mut buffer = [0; BUFFER_SIZE];
    write_to_buffer(&mut buffer, 0);
}

fn make_noise() {
    vec![0].append(&mut vec![0]);
}

fn write_to_buffer(buffer: &mut [u8; BUFFER_SIZE], mut i: usize) {
    i += 4096;
    if i >= BUFFER_SIZE {
        return;
    }
    write_to_buffer(buffer, i);
    buffer[i] = 1;
}
```

I expected the program to exit normally.
Instead, this happened:

```
free(): double free detected in tcache 2
Aborted
```

### Meta

Tested on Linux with the following Rust versions :

- `rustc 1.63.0 (4b91a6ea7 2022-08-08)`
- `rustc 1.64.0-beta.3 (82bf34178 2022-08-18)`
- `rustc 1.65.0-nightly (015a824f2 2022-08-22)`

Only reproducible with `--release`.
Can be reproduced on Windows inside a [Rust Docker container](https://hub.docker.com/_/rust).

⚠️ **WARNING** ⚠️  
The program may use about 5 GiB of memory and may hang the system. So be sure to have enough space and be ready to kill the process.

**Backtrace**  
No backtrace is printed with `RUST_BACKTRACE=1`.
Repository: vscode
Issue: Merge Editor Highlighting Bug
Labels: bug,merge-editor

![recording](https://user-images.githubusercontent.com/2931520/186120386-97883ce8-bc22-4849-9336-d17841e35709.gif)
Repository: rust
Issue: [doc_auto_cfg] feature gated macros are not marked with feature badge
Labels: T-rustdoc,F-doc_auto_cfg

I have some macros behind a feature flag and when generating the doc, they don't have the feature badge.
I had to mark each of them manually with `doc(cfg(feature = "my_feature"))` (and in an `cfg_attr` to keep compiling on stable)

I'm not sure if this is intended or not but I couldn't find anything on the subject on this repo :)
Repository: vscode
Issue: Click in scroll decorations in diff editor doesn't always go to the clicked section
Labels: bug,unicode-highlight

I was reviewing https://insiders.vscode.dev/github/microsoft/vscode-loc/pull/1011 when I saw this issue. 
![Recording 2022-08-23 at 12 22 01](https://user-images.githubusercontent.com/38270282/186134783-c27e3775-167e-4e6c-bb3b-0a0b34f6679a.gif)


The issue occurs with i18n/vscode-language-pack-fr/translations/main.i18n.json from that PR.
Repository: rust
Issue: `STATUS_ACCESS_VIOLATION` in unstable `thread_local` feature on `windows-gnu`
Labels: O-windows-gnu,C-bug,F-thread_local

I tried this code:

```rust
#![feature(thread_local)]

use std::cell::RefCell;
use std::mem::MaybeUninit;

#[thread_local]
static PLACE: RefCell<usize> = RefCell::new(0);

fn touch(x: usize) {
    *PLACE.borrow_mut() = x;
}

pub fn main() {
    touch(12);
}
```
But it breaks down inside `RefCell`:
`error: process didn't exit successfully: 'target\debug\sandbox.exe' (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)`

Debugger comes to here:
![image](https://user-images.githubusercontent.com/68294279/186135245-e29dd6ba-e61e-43d6-a205-4d2fb4196ff4.png)


```
rustc 1.65.0-nightly (878aef79d 2022-08-20)
binary: rustc
commit-hash: 878aef79dcdf59d19bb8482202dc55e58ceb62ff
commit-date: 2022-08-20
host: x86_64-pc-windows-gnu
release: 1.65.0-nightly
LLVM version: 15.0.0

```
Repository: angular
Issue: optional types are not recognized while using mapped type with FormGroup
Labels: area: forms,cross-cutting: types,P3,forms: strictly typed

### Which @angular/* package(s) are the source of the bug?

forms

### Is this a regression?

No

### Description

I have created a generic type to map my existing interface into a formgroup, 

![controlsof-type](https://user-images.githubusercontent.com/64351428/186136106-4afec64c-6909-4d14-9284-2829f0437125.jpeg)

![controls-of-type-2](https://user-images.githubusercontent.com/64351428/186136285-a56cff46-2b85-4f72-97f3-a6e4086eefdb.jpeg)

And it worked well until I marked a field as optional, these are screenshots of the error,

<img width="246" alt="errors-out-2" src="https://user-images.githubusercontent.com/64351428/186136708-0fd0f2aa-9616-4184-88e0-84c2a70f5df8.png">

![errors-out-1](https://user-images.githubusercontent.com/64351428/186136663-99940f29-1b64-41d7-8852-577b672761a1.png)

but it works fine when I created a Formgroup, like this

` assignForm: FormGroup<{
    team: FormControl<Team>,
    category: FormControl<Category>,
    product: FormControl<Product>
  }>`



### Please provide a link to a minimal reproduction of the bug

_No response_

### Please provide the exception or error you saw

_No response_

### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 14.0.0
Node: 14.17.2
Package Manager: npm 6.14.13
OS: linux x64

Angular: 14.1.0
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1401.0
@angular-devkit/build-angular   14.1.0
@angular-devkit/core            14.1.0
@angular-devkit/schematics      14.0.2
@angular/cli                    14.1.0
@schematics/angular             14.0.6
rxjs                            7.5.6
typescript                      4.7.4
```


### Anything else?

_No response_