sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Segfault in torch._C._nn.reflection_pad2d
Labels: triaged,module: edge cases

### 🐛 Describe the bug


Function `torch._C._nn.reflection_pad2d` contains segmentation fault.

### Example to reproduce

```
import torch

tensor_0 = torch.full([6, 5, 7], -8754, dtype=torch.int32, requires_grad=False)
intarrayref_1 = []
torch._C._nn.reflection_pad2d(tensor_0, intarrayref_1)
```

### Result

Segmentation fault

### Expected Behavior

Throwing a Python Exception

### Notes

This bug was discovered using [Atheris](https://github.com/google/atheris).

### Versions

Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: Debian GNU/Linux 11 (bullseye) (x86_64)
GCC version: (Debian 10.2.1-6) 10.2.1 20210110
Clang version: 11.0.1-2
CMake version: version 3.18.4
Libc version: glibc-2.31
Python version: 3.9.7 (default, Sep 16 2021, 13:09:58)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.10.0-11-amd64-x86_64-with-glibc2.31
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
Versions of relevant libraries:
[pip3] numpy==1.22.3
[pip3] torch==1.11.0
[pip3] torchaudio==0.11.0
[pip3] torchvision==0.12.0
[conda] blas                      1.0                         mkl
[conda] cpuonly                   2.0                           0    pytorch
[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.2           py39h20f2e39_0
[conda] numpy-base                1.21.2           py39h79a1101_0
[conda] pytorch                   1.11.0              py3.9_cpu_0    pytorch
[conda] pytorch-mutex             1.0                         cpu    pytorch
[conda] torchaudio                0.11.0                 py39_cpu    pytorch
[conda] torchvision               0.12.0                 py39_cpu    pytorch
Repository: pytorch
Issue: Segfault in torch._C._nn.thnn_conv2d
Labels: triaged,module: edge cases

### 🐛 Describe the bug

Function `torch._C._nn.thnn_conv2d` contains segmentation fault.

### Example to reproduce

```
import torch

tensor_0 = torch.full([3, 3, 3], -4398, dtype=torch.float64, requires_grad=False)
tensor_1 = torch.full([6, 7], -4532, dtype=torch.int32, requires_grad=False)
intarrayref_2 = -10000
tensor_3 = torch.full([3, 3, 3, 6, 7], -2321, dtype=torch.float16, requires_grad=False)
intarrayref_4 = -2807
intarrayref_5 = []
torch._C._nn.thnn_conv2d(tensor_0, tensor_1, intarrayref_2, tensor_3, intarrayref_4, intarrayref_5)
```

### Result

Segmentation fault

### Expected Behavior

Throwing a Python Exception

### Notes

This bug was discovered using [Atheris](https://github.com/google/atheris).


### Versions

Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: Debian GNU/Linux 11 (bullseye) (x86_64)
GCC version: (Debian 10.2.1-6) 10.2.1 20210110
Clang version: 11.0.1-2
CMake version: version 3.18.4
Libc version: glibc-2.31
Python version: 3.9.7 (default, Sep 16 2021, 13:09:58)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.10.0-11-amd64-x86_64-with-glibc2.31
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
Versions of relevant libraries:
[pip3] numpy==1.22.3
[pip3] torch==1.11.0
[pip3] torchaudio==0.11.0
[pip3] torchvision==0.12.0
[conda] blas                      1.0                         mkl
[conda] cpuonly                   2.0                           0    pytorch
[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.2           py39h20f2e39_0
[conda] numpy-base                1.21.2           py39h79a1101_0
[conda] pytorch                   1.11.0              py3.9_cpu_0    pytorch
[conda] pytorch-mutex             1.0                         cpu    pytorch
[conda] torchaudio                0.11.0                 py39_cpu    pytorch
[conda] torchvision               0.12.0                 py39_cpu    pytorch
Repository: pytorch
Issue: Segfault in _embedding_bag_forward_only
Labels: triaged,module: edge cases

### 🐛 Describe the bug

Function `torch._embedding_bag_forward_only` contains segmentation fault.

### Example to reproduce

```
import torch

weight = torch.full([2, 2, 5, 3, 3], -8670, dtype=torch.float64, requires_grad=False)
indices = torch.full([3, 0, 1], -4468, dtype=torch.int32, requires_grad=False)
offsets = torch.full([7, 1, 0], -7226, dtype=torch.int64, requires_grad=False)
scale_grad_by_freq = True
mode = torch.full([], 6318, dtype=torch.int64, requires_grad=False)
sparse = False
per_sample_weights = torch.full([3], -8750, dtype=torch.int64, requires_grad=False)
include_last_offset = False
padding_idx = torch.full([], 6383, dtype=torch.int64, requires_grad=False)
torch._embedding_bag_forward_only(weight, indices, offsets, scale_grad_by_freq, mode,
                                  sparse, per_sample_weights, include_last_offset, padding_idx)
```

### Result

Segmentation fault

### Expected Behavior

Throwing a Python Exception

### Notes

This bug was discovered using [Atheris](https://github.com/google/atheris).

### Versions

Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: Debian GNU/Linux 11 (bullseye) (x86_64)
GCC version: (Debian 10.2.1-6) 10.2.1 20210110
Clang version: 11.0.1-2
CMake version: version 3.18.4
Libc version: glibc-2.31
Python version: 3.9.7 (default, Sep 16 2021, 13:09:58)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.10.0-11-amd64-x86_64-with-glibc2.31
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
Versions of relevant libraries:
[pip3] numpy==1.22.3
[pip3] torch==1.11.0
[pip3] torchaudio==0.11.0
[pip3] torchvision==0.12.0
[conda] blas                      1.0                         mkl
[conda] cpuonly                   2.0                           0    pytorch
[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.2           py39h20f2e39_0
[conda] numpy-base                1.21.2           py39h79a1101_0
[conda] pytorch                   1.11.0              py3.9_cpu_0    pytorch
[conda] pytorch-mutex             1.0                         cpu    pytorch
[conda] torchaudio                0.11.0                 py39_cpu    pytorch
[conda] torchvision               0.12.0                 py39_cpu    pytorch
Repository: go
Issue: runtime: SIGSEGV with no other output when running `runtime` test on android-arm64-corellium since 2022-05-19
Labels: OS-Android,NeedsInvestigation,arch-arm64,compiler/runtime

```
signal: segmentation fault
FAIL	runtime	2.511s
```

`greplogs -l -e '(?ms)android-.*^signal: segmentation fault\nFAIL\s' --since=2021-01-01`
[2022-05-20T19:01:40-69b412b/android-arm64-corellium](https://build.golang.org/log/3de4ab0b96f94d8ca0dd3a1f16075f5e55d1ff87)
[2022-05-20T16:16:37-c6ef69e/android-arm64-corellium](https://build.golang.org/log/2c052a81bf05c77b671b62d2eb22c2d2ae1fe9b6)
[2022-05-19T20:20:43-97ce98a/android-arm64-corellium](https://build.golang.org/log/360e910eccaca32a3c207f2192957639b568e422)

(attn @golang/android; CC @golang/runtime)
Repository: pytorch
Issue: Segfault in _grid_sampler_2d_cpu_fallback
Labels: triaged,module: edge cases

### 🐛 Describe the bug


Function `torch._grid_sampler_2d_cpu_fallback` contains segmentation fault.

### Example to reproduce

```
import torch

input = torch.full([3, 3, 3, 2], 9490, dtype=torch.float32, requires_grad=False)
grid = torch.full([0, 3, 8, 2, 4, 1], -9545, dtype=torch.float32, requires_grad=False)
interpolation_mode = 8330
padding_mode = 5934
align_corners = False
torch._grid_sampler_2d_cpu_fallback(input, grid, interpolation_mode, padding_mode, align_corners)
```

### Result

Segmentation fault

### Expected Behavior

Throwing a Python Exception

### Notes

This bug was discovered using [Atheris](https://github.com/google/atheris).

### Versions

Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: Debian GNU/Linux 11 (bullseye) (x86_64)
GCC version: (Debian 10.2.1-6) 10.2.1 20210110
Clang version: 11.0.1-2
CMake version: version 3.18.4
Libc version: glibc-2.31
Python version: 3.9.7 (default, Sep 16 2021, 13:09:58)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.10.0-11-amd64-x86_64-with-glibc2.31
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
Versions of relevant libraries:
[pip3] numpy==1.22.3
[pip3] torch==1.11.0
[pip3] torchaudio==0.11.0
[pip3] torchvision==0.12.0
[conda] blas                      1.0                         mkl
[conda] cpuonly                   2.0                           0    pytorch
[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.2           py39h20f2e39_0
[conda] numpy-base                1.21.2           py39h79a1101_0
[conda] pytorch                   1.11.0              py3.9_cpu_0    pytorch
[conda] pytorch-mutex             1.0                         cpu    pytorch
[conda] torchaudio                0.11.0                 py39_cpu    pytorch
[conda] torchvision               0.12.0                 py39_cpu    pytorch
Repository: pytorch
Issue: Segfault in _pad_packed_sequence
Labels: triaged,module: edge cases

### 🐛 Describe the bug


Function `torch._pad_packed_sequence` contains segmentation fault.

### Example to reproduce

```
import torch

data = torch.full([1, 1, 1, 1], -10000, dtype=torch.float16, requires_grad=False)
batch_sizes = torch.full([0], 978, dtype=torch.int64, requires_grad=False)
batch_first = True
padding_value = False
total_length = torch.full([], -9937, dtype=torch.int64, requires_grad=False)
torch._pad_packed_sequence(data, batch_sizes, batch_first, padding_value, total_length)
```

### Result

Segmentation fault

### Expected Behavior

Throwing a Python Exception

### Notes

This bug was discovered using [Atheris](https://github.com/google/atheris).

### Versions

Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: Debian GNU/Linux 11 (bullseye) (x86_64)
GCC version: (Debian 10.2.1-6) 10.2.1 20210110
Clang version: 11.0.1-2
CMake version: version 3.18.4
Libc version: glibc-2.31
Python version: 3.9.7 (default, Sep 16 2021, 13:09:58)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.10.0-11-amd64-x86_64-with-glibc2.31
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
Versions of relevant libraries:
[pip3] numpy==1.22.3
[pip3] torch==1.11.0
[pip3] torchaudio==0.11.0
[pip3] torchvision==0.12.0
[conda] blas                      1.0                         mkl
[conda] cpuonly                   2.0                           0    pytorch
[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.2           py39h20f2e39_0
[conda] numpy-base                1.21.2           py39h79a1101_0
[conda] pytorch                   1.11.0              py3.9_cpu_0    pytorch
[conda] pytorch-mutex             1.0                         cpu    pytorch
[conda] torchaudio                0.11.0                 py39_cpu    pytorch
[conda] torchvision               0.12.0                 py39_cpu    pytorch
Repository: pytorch
Issue: Enhancements to AliasDB to handle in-place operations
Labels: oncall: jit

### 🚀 The feature, motivation and pitch

https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/OVERVIEW.md#handling-mutability
`The intention is that if you only mutate the graph through AliasDb, you don't have to think about mutability/aliasing at all in your pass. As we write more passes, the interface to AliasDb will get richer (one example is transforming an in-place operation to its pure equivalent if we can prove it's safe).`

Is the work called out here to enhance AliasDB currently planned or in-progress? I've hit a few issues around in-place container mutations (ex.` aten::_set_item`)  and they don't seem to be handled well in torchscript generally (ex. parseIR does not support read-back of ops that do not produce a value). Expanding AliasDB to provide more tools to understand/resolve these ops would be helpful.

As an example, this function in torch-tensorrt currently misses in-place container operations as dependencies of an input value. Adding a pass to remove these ops or providing access to the underlying graph in AliasDB to identify dependencies correctly would help resolve these issues.
https://github.com/pytorch/TensorRT/blob/e9e824c0ef0a4704826a390fe7d2ef90272a56b7/core/partitioning/partitioning.cpp#L60

### Alternatives

_No response_

### Additional context

_No response_
Repository: electron
Issue: [Bug]: no global menu support in wayland-only sessions (linux)
Labels: platform/linux,bug :beetle:,wayland

### 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

19

### What operating system are you using?

Other Linux

### Operating System Version

debian 11

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

the global menu functionality (exporting the menu to the menu field in the menubar) should be used out of the box, if you use a x11 or wayland-flavour of linux (and ui of your choice).

### Actual Behavior

global menu does not show up at all (brave, freetube, signal, heroic) when used in a wayland-only environment.
workaround is falling back to x11 by setting GDK_BACKEND="x11" (while *not* setting --ozone-platform=wayland at all or making it default).
resulting in a linux ui / usage-scenario where a whole bunch of electron-apps are currently not benefiting from wayland features (scaling, UHD-resolution, security) while the whole linux-cosystem has mature wayland-support for nearly 1 year.

### Testcase Gist URL

_No response_

### Additional Information

_No response_
Repository: flutter
Issue: [maps][android]: Map freezes when zooming in on specific device
Labels: e: device-specific,platform-android,p: maps,package,P3,team-android,triaged-android

I'm creating a simple page with "google_maps_flutter".
The map opens normally, however, when I zoom in, the map freezes, not allowing any further action.

Follow code below.

```
class TelaMapa3 extends StatelessWidget {  
  const TelaMapa3({ Key? key }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      child: GoogleMap(
        mapType: MapType.normal,
        initialCameraPosition: CameraPosition(
          target: LatLng(-3.685522, -40.3559426),
          zoom: 14,
        ),
      ),
    );
  }
}

```



```
doctor -v

[✓] Flutter (Channel stable, 2.10.3, on macOS 12.3.1 21E258 darwin-x64, locale
    pt-BR)
    • Flutter version 2.10.3 at /Users/felipeparente/flutter_sdk
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (3 months ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version
    30.0.3)
    • Android SDK at /Users/felipeparente/Library/Android/sdk
    • Platform android-31, build-tools 30.0.3
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.67.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.40.0

[✓] Connected device (2 available)
    • Q2i (mobile) • 202110174091 • android-arm    • Android 8.1.0 (API 27)
    • Chrome (web) • chrome       • web-javascript • Google Chrome
      101.0.4951.64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```
Repository: pytorch
Issue: `matmul, mm` triggers INTERNAL ASSERT FAILED when input requires grad
Labels: module: autograd,triaged,actionable

### 🐛 Describe the bug

`matmul` triggers INTERNAL ASSERT FAILED when input requires grad

```python
import torch

input_tensor = torch.randint(-8, 2, [11, 0, 4], dtype=torch.int8)
other_tensor = torch.rand([4], dtype=torch.float32)

input = input_tensor.clone()
other = other_tensor.clone()
res1 = torch.matmul(input, other, )
# Normal Pass

input = input_tensor.clone()
other = other_tensor.clone().requires_grad_()
res2 = torch.matmul(input, other, )
# RuntimeError: isDifferentiableType(variable.scalar_type())INTERNAL ASSERT FAILED at "/Users/distiller/project/pytorch/torch/csrc/autograd/functions/utils.h":65, please report a bug to PyTorch. 
```

Plus, `mm` also has such issue

```python
import torch
input_tensor = torch.randint(0, 2, [0, 3], dtype=torch.uint8)
mat2_tensor = torch.rand([3, 2], dtype=torch.float32)

input = input_tensor.clone()
mat2 = mat2_tensor.clone()
res1 = torch.mm(input, mat2, )

input = input_tensor.clone()
mat2 = mat2_tensor.clone().requires_grad_()
res2 = torch.mm(input, mat2, )
# RuntimeError: isDifferentiableType(variable.scalar_type())INTERNAL ASSERT FAILED at "/Users/distiller/project/pytorch/torch/csrc/autograd/functions/utils.h":65, please report a bug to PyTorch. 
```

### Versions

pytorch: 1.11.0

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7
Repository: rust
Issue: Give dynamically generated instructions on how to replicate x.py errors
Labels: E-hard,T-bootstrap

It can often be difficult to know the minimal command line to reproduce errors, especially when the command CI is running is a full `x.py test` and the error comes from a test that is rarely run locally. It would be amazing if bootstrap could print how to run the Step for a failed command, to make it easier to replicate the failure locally.

I have some prior work in https://github.com/rust-lang/rust/pull/86022 that never got merged - a good first step would be to rebase that and address the review comments.

@rustbot label +A-rustbuild +E-hard
Repository: rust
Issue: Create a tool which suggests tests to run based on modified files
Labels: A-testsuite,E-mentor,E-help-wanted,E-medium,A-contributor-roadblock

@digama0 came up with an excellent idea: it should be possible to, given the files modified since your git checkout last branched from master, generate suggestions for the tests you should run (i.e. those most likely to fail because of your changes). Some examples:
- library/std/src/lib.rs => `x test --stage 0 tidy library/std`
- compiler/rustc_data_structures => `x check && x test --stage 0 tidy compiler/rustc_data_structures && x test --stage 1 src/test/ui src/test/run-make`
- `src/librustdoc/src/lib.rs` => `x test --stage 1 tidy rustdoc`

You can determine the files modified with `git diff --name-only $(git merge-base HEAD origin/master)`.

This tool doesn't necessarily need to live in tree - it could just be some crate in a public git repo that people install, and we can move it in-tree later if it's useful. I was imagining it could be called `suggest-tests` or something like that.

@rustbot label +E-medium +E-mentor +E-help-wanted +A-testsuite +A-contributor-roadblock

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->
This issue has been assigned to @Ezrashaw via [this comment](https://github.com/rust-lang/rust/issues/97339#issuecomment-1396926282).
<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"Ezrashaw"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->