sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: rustc fails to detect variable bounds
Labels: A-LLVM,I-slow,T-compiler,C-bug,A-mir-opt,C-optimization

This is probably an LLVM issue, but I decided to start my journey here. rustc/LLVM seems to be unable to detect bounds of a variable inside of this simple loop:

```rust
pub fn walk(slice: &mut [u64]) -> bool {
    let mut cursor = 0;

    for i in 0..slice.len() {
        cursor += (slice[i] != 0) as usize;
    }
    
    cursor <= slice.len()
}
```

The [code generated](https://godbolt.org/z/438qrrhG8) for the function above is not a simple constant return, but it actually processes the whole slice.

The reason why this is an interesting use case is because you cannot seem to write a fully optimized `compact` function without unsafe code:

```rust
pub fn compact_slow(slice: &mut [u64]) {
    let mut cursor = 0;

    for i in 0..slice.len() {
        let val = slice[i];

        slice[cursor] = val;

        cursor += (val != 0) as usize;
    }
}
```

[godbolt](https://godbolt.org/z/PK4f6q9K7) (with bounds check)

```rust
pub fn compact_fast(slice: &mut [u64]) {
    let mut cursor = 0;

    for i in 0..slice.len() {
        let val = unsafe {
            let val = *slice.get_unchecked(i);

            *slice.get_unchecked_mut(cursor) = val;

            val
        };

        cursor += (val != 0) as usize;
    }
}
```

[godbolt](https://godbolt.org/z/dKeErK7Gz) (without bounds check)
Repository: flutter
Issue: `_DefaultPub.get` tries to read `version` file but does not hold the lock long enough to do so
Labels: c: crash,tool,P2,team-tool,triaged-tool

`_DefaultPub.get` has this code:

```
    final File currentVersion = _fileSystem.file(
      _fileSystem.path.join(Cache.flutterRoot!, 'version'));
    // ...
    if (/*...*?
        lastVersion.readAsStringSync() == currentVersion.readAsStringSync()) {
      // ...
```

That code has a race condition. If that command runs in parallel with another `flutter` command, there's no guarantee that the `currentVersion` file will still be around.

We should not release the lockfile until after this test is done.

cc @christopherfujino @jmagman
Repository: flutter
Issue: [web][html] ImageFilter.matrix in BackdropFilter does not work
Labels: engine,platform-web,e: web_html,has reproducible steps,P2,found in release: 3.0,found in release: 3.1,team-web,triaged-web

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

I was using [magnifier](https://github.com/preetjdp/magnifier) with `BackdropFilter` and `ImageFilter.matrix` , but when I run codes with ` --web-renderer html` , `ImageFilter.matrix` did not work well. Here are sample codes.


<details>
<summary>Code sample</summary>

<!--
      Please create a minimal reproducible sample that shows the problem
      and attach it below between the lines with the backticks.

      To create it you can use `flutter create bug` command and update the `main.dart` file.

      Alternatively, you can use https://dartpad.dev/
      which is capable of creating and running small Flutter apps.

      Without this we will unlikely be able to progress on the issue, and because of that
      we regretfully will have to close it.
-->

```dart
import 'dart:ui';

import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: Homepage(),
  ));
}

class Homepage extends StatelessWidget {
  const Homepage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    Matrix4 newMatrix = Matrix4.identity()..scale(1.5);

    return Scaffold(
        appBar: AppBar(title: Text("BackdropFilterDemo")),
        body: Stack(
          children: <Widget>[
            Container(
              alignment: Alignment.center,
              child: Text("BackdropFilterDemo" * 10),
            ),
            BackdropFilter(
              // filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
              filter: ImageFilter.matrix(newMatrix.storage),
              child: Container(
                color: Colors.white.withAlpha(0),
              ),
            )
          ],
        ));
  }
}
```
</details>

Here are results.

| HTML | Canvaskit |
| -- | -- |
| <img src="https://user-images.githubusercontent.com/33513462/183590415-cb2482d1-1377-45e6-a195-da31d3ffab87.png" /> | <img src="https://user-images.githubusercontent.com/33513462/183590599-9fc3c5e3-e46b-4afb-a431-5ad8a2bc0d7d.png" /> |
Repository: godot
Issue: Vulkan: SSIL not rendering correctly on AMD GCN 1.0 GPU
Labels: bug,platform:windows,topic:rendering,topic:thirdparty,topic:3d

### Godot version

4.0 alpha 13

### System information

Windows 10 GLES3 AMD Radeon HD 8730M

### Issue description

When activating SSIL some weird artefacts happend.

![image](https://user-images.githubusercontent.com/73260374/183598307-0f6aa314-a103-468a-b83e-aecad0377fbd.png)

![image](https://user-images.githubusercontent.com/73260374/183598535-45782dc6-b718-4c64-82a8-b1282b3a5f6c.png)

This also happens in Debug window.

### Steps to reproduce

1. Add a world environment node.
2. Go to SSIL section
3. Enable

### Minimal reproduction project

_No response_
Repository: pytorch
Issue: torch.empty_strided argument 'size'and 'stride' documentation wrong
Labels: module: docs,triaged

### 📚 The doc issue

The argument ('size' and 'stride') written on the document is tuple. However, I found that when argument ('size' and 'stride') is list, this api also works.

```
import torch
results={}
arg_1 = [2,2]
arg_2 = [4,2]
arg_3 = "cpu"
results['res'] = torch.empty_strided(arg_1,arg_2,device=arg_3,)
```

### Suggest a potential alternative/fix

It would be better if the document could write as this: 
size (tuple/list of python:ints) – the shape of the output tensor
stride (tuple/list of python:ints) – the strides of the output tensor

cc @svekars @holly1238
Repository: godot
Issue: Vulkan: LightmapGI does not take lights' shadow opacity into account for lights with Static GI mode
Labels: topic:rendering,topic:3d

### Godot version

4.0.alpha (c2eaaef14)

### System information

Fedora 36, GeForce GTX 1080 (NVIDIA 515.57)

### Issue description

LightmapGI does not take lights' shadow opacity into account for lights with Static GI mode (fully baked lights, with both direct light and indirect light baked).

Changing DirectionalLight3D's shadow opacity has an effect on fully baked surfaces, but not in all situations. On the other hand, this works even *after* baking lightmaps. Changing the DirectionalLight3D's color after baking doesn't have any effect on baked surfaces, though.

Given the lightmapper uses a raytracing approach, it may be more difficult to implement this.

Real-time transparent shadows | Real-time opaque shadows
-|-
![2022-08-09_12 43 10](https://user-images.githubusercontent.com/180032/183630704-4a21a975-bf22-4230-8f5c-48f25cd54459.png) | ![2022-08-09_12 43 14](https://user-images.githubusercontent.com/180032/183630710-90c6a0e6-6e20-4a22-859d-76882be0eb90.png)

Baked transparent shadows (looks like opaque) | Baked opaque shadows
-|-
![2022-08-09_12 43 17](https://user-images.githubusercontent.com/180032/183630712-391c652f-bf74-4fe2-9c58-dfdba0167f88.png) | ![2022-08-09_12 43 19](https://user-images.githubusercontent.com/180032/183630714-d698a036-1123-4f9f-b531-4850a6c3b21f.png)

### Steps to reproduce

- Import a glTF scene with the Static Lightmaps GI mode option.
- Add a LightmapGI node (but don't bake it yet).
- Add a OmniLight3D, enable shadows and decrease Shadow Opacity to 0.5. Look at the shadow's opacity decreasing as you adjust its opacity.
- Change the OmniLight3D's GI mode to Static and bake lightmaps.
- Notice how the shadow has full opacity again.

### Minimal reproduction project

[test_lightmap_shadow_opacity.zip](https://github.com/godotengine/godot/files/9289750/test_lightmap_shadow_opacity.zip)
Repository: pytorch
Issue: Updating the LTS version of the torch (1.8.2 -> 1.10.2\1.11.2?)
Labels: module: binaries,triaged

### 🚀 The feature, motivation and pitch

The current current version of LTS torch is already more than 4 versions behind the new one.

To maintain interprise projects, you want to update the version of the torus, or understand when it is planned to be done in order to plan your roadmaps.

### Alternatives

when is it planned to be done? to plan your roadmaps. 

https://discuss.pytorch.org/t/pytorch-lts-release-schedule/153282

### Additional context

recently released version of PL in which support for torch 1.8.2 has ceased


https://github.com/Lightning-AI/lightning/issues/14086

cc @ezyang @seemethere @malfet
Repository: create-react-app
Issue: Typescript build error file location
Labels: needs triage

Hi,

When building my app, when there is a TS error, it does not report the location of the file where the error is. We have a big repo, and it is a real pain to locate this error. Am I missing something?

<img width="1293" alt="Screenshot 2022-08-09 at 13 04 39" src="https://user-images.githubusercontent.com/26057014/183633041-11b5ddf2-beac-455e-987d-3afbfac185f5.png">
Repository: tensorflow
Issue:  Type inference failed. This indicates an invalid graph that escaped type checking. Error message: INVALID_ARGUMENT
Labels: stat:awaiting tensorflower,type:bug,comp:keras,TF 2.9

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Source

binary

### Tensorflow Version

2.9.1

### Custom Code

No

### OS Platform and Distribution

Linux Ubuntu 20.04

### Mobile device

_No response_

### Python version

3.8

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

```shell
When running `model.predict` I am getting the warning. What does that mean and how can I fix it ?
```


### Standalone code to reproduce the issue

```shell
The model is a keras.functional.Functional model where the first layers are from tensorflow hub pretrained models. I have two dense layers in the end. compiling, fitting do not give any warning however when running `model.predict(["examplestring"])` I get the warning.
```


### Relevant log output

```shell
2022-08-09 15:37:17.301561: W tensorflow/core/common_runtime/forward_type_inference.cc:231] Type inference failed. This indicates an invalid graph that escaped type checking. Error message: INVALID_ARGUMENT: expected a subtype of type_id: TFT_TENSOR
args {
  type_id: TFT_LEGACY_VARIANT
}
 for input 2 of a homogeneous container 1001, got type_id: TFT_RAGGED
args {
  type_id: TFT_INT32
}

        while inferring type of node 'model/preprocessing/StatefulPartitionedCall/StatefulPartitionedCall/StatefulPartitionedCall/StatefulPartitionedCall/StatefulPartitionedCall/bert_pack_inputs/PartitionedCall/map/while/body/_337/map/while/TensorArrayV2Write/TensorListSetItem'
```
</details>
Repository: svelte
Issue: Provide classname utility for style encapsulation between parent/child component
Labels: feature request,css

### Describe the problem

Sometimes style switching logic is placed in the parent component and controlled by switching the classNames. To avoid using the global CSS className, we need a utility to create a unique className and mark it as used.

### Describe the proposed solution

There is a proposal API:

```html
// Parent.svelte
<script>
import Child from './Child.svelte'
import { classname } from 'svelte/classname'

const luckyClassName = classname('lucky')
const unluckyClassName = classname('unlucky')

let isLucky = false

</script>

<Child class={isLucky ? luckyClassName : unluckyClassName} on:click={() => isLucky = !isLucky} />

<style>
// mark as used
.lucky {
  color: red;
}

// mark as used
.unlucky {
  color: blue;
}
</style>

```

### Alternatives considered

No

### Importance

would make my life easier
Repository: vscode
Issue: Extensions list is empty on a disconnected window bug report screen
Labels: bug,issue-reporter

Issue Type: <b>Bug</b>

My ssh connection keeps dying, I went to file a report, but can't chose the correct extension because the extensions list in the bug report screen is completely empty on a disconnected window.

I'm not sure if this belongs here or remote-ssh possibly

VS Code version: Code 1.69.2 (Universal) (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:12:57.074Z)
OS version: Darwin arm64 21.5.0
Restricted Mode: No
Connection to 'SSH: dev' could not be established  Canceled

<img width="764" alt="image" src="https://user-images.githubusercontent.com/320562/183647419-425d8f84-f090-4c4a-aa5f-07c45d004883.png">

<!-- generated by issue reporter -->
Repository: flutter
Issue: [proposal] add "backgroundDecoration" to Scaffold
Labels: c: new feature,framework,f: material design,c: proposal,P3,has partial patch,team-design,triaged-design

## Use case

A common way decorate the background of a [scaffold](https://api.flutter.dev/flutter/material/Scaffold-class.html), 
beyond the [backgroundColor](https://api.flutter.dev/flutter/material/Scaffold/backgroundColor.html) property (maybe an image or a gradient), 
is to add a [stack](https://api.flutter.dev/flutter/widgets/Stack-class.html) in the [body](https://api.flutter.dev/flutter/material/Scaffold/body.html).

By definition the scaffold body is `The primary content of the scaffold.`, 
which is not the use case for a background decoration.


## Proposal

Adding a `Widget` or `BoxDecoration` parameter `backgroundDecoration` 
could make the usage of the scaffold **cleaner** 
and better separate the content and "un-clutter" the body from the underlying decoration.

```dart
     Scaffold(
        backgroundDecoration: BoxDecoration(
          image:  DecorationImage( 
            //...
          ),
        ),
        // body: Stack(
        body: ActualContent( //...

```
Repository: go
Issue: x/build: `TestGdbBacktrace` fails on Linux builders with `gdb` version `>=11.1` due to AppArmor restrictions on `/proc/.../task/.../mem`
Labels: ExpertNeeded,Builders,NeedsInvestigation,compiler/runtime


### What version of Go are you using (`go version`)?

This is with tip.

### What operating system and processor architecture are you using (`go env`)?

linux/amd64 on the linux-amd64-alpine builder

### What did you do?

go test -test.v -test.run=TestGdbBacktrace runtime

### What did you expect to see?

pass

### What did you see instead?

```
--- FAIL: TestGdbBacktrace (0.93s)
    runtime-gdb_test.go:76: gdb version 11.2
    testenv.go:473: [gdb -nx -batch -iex add-auto-load-safe-path /workdir/go/src/runtime -ex set startup-with-shell off -ex break main.eee -ex run -ex backtrace -ex continue /workdir/tmp/TestGdbBacktrace1177699378/001/a.exe] exit status: exit status 1
    runtime-gdb_test.go:428: gdb output:
        Loading Go Runtime support.
        Breakpoint 1 at 0x456f40: file /workdir/tmp/TestGdbBacktrace1177699378/001/main.go, line 17.
        Warning:
        Cannot insert breakpoint 1.
        Cannot access memory at address 0x456f40
        
        Command aborted.
        #0  _rt0_amd64_linux () at /workdir/go/src/runtime/rt0_linux_amd64.s:8
        Warning:
        Cannot insert breakpoint 1.
        Cannot access memory at address 0x456f40
        
        Command aborted.
    runtime-gdb_test.go:443: gdb exited with error: exit status 1

```

This needs to be looked into -- I am not sure what the issue might be. I did try:

```
echo 0 > /proc/sys/kernel/yama/ptrace_scope
```

on the builder, but I am still seeing the failure.
Repository: go
Issue: cmd/go,misc/cgo: problems with PIE builds on alpine builder 
Labels: NeedsInvestigation


### What version of Go are you using (`go version`)?

<pre>
$ go version
go version devel go1.20-13bd6ddbe7 Tue Aug 9 12:18:32 2022 +0000 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes.

### What operating system and processor architecture are you using (`go env`)?

linux/amd64 on Alpine

### What did you do?

run all.bash

### What did you expect to see?

clean run

### What did you see instead?

There appear to be several failures on the linux-amd64-alpine builder related to PIE build mode. Details:

```
--- FAIL: TestBuildmodePIE (0.00s)
    --- FAIL: TestBuildmodePIE/non-cgo (7.49s)
        go_test.go:2199: running testgo [build -buildmode=pie -o /workdir/tmp/cmd-go-test-1325586298/gotest3971771153/main.exe /workdir/tmp/cmd-go-test-1325586298/gotest3971771153/main.go]
        go_test.go:2288: fork/exec /workdir/tmp/cmd-go-test-1325586298/gotest3971771153/main.exe: no such file or directory
go test proxy running at GOPROXY=http://127.0.0.1:41491/mod
FAIL
FAIL	cmd/go	61.246s
...
##### internal linking of -buildmode=pie
fork/exec /workdir/tmp/go-build3110784466/b001/reflect.test: no such file or directory
FAIL	reflect	0.001s
FAIL
2022/08/09 13:27:44 Failed: exit status 1
ok  	os/user	0.005s
...
fork/exec /workdir/tmp/go-build2474382477/b001/nocgo.test: no such file or directory
FAIL	misc/cgo/nocgo	0.000s
FAIL
2022/08/09 13:28:15 Failed: exit status 1
...
##### ../misc/cgo/testshared
--- FAIL: TestTrivialPIE (0.21s)
    shared_test.go:52: executing ./trivial_pie (trivial_pie) failed fork/exec ./trivial_pie: no such file or directory:
FAIL
FAIL	misc/cgo/testshared	54.116s
FAIL
2022/08/09 13:29:16 Failed: exit status 1

```

This needs to be looked into. I am guessing that it has something to do with the builder configuration.
Repository: pytorch
Issue: make_fx + aot_autograd segfaults
Labels: module: crash,triaged,module: fx,fx,module: functorch

### 🐛 Describe the bug

An example is taken from the `aot_function` docstring and I tried using `make_fx` on the callable returned by `aot_function`:
```py
import torch
from functorch.compile import aot_function
from torch.fx.experimental.proxy_tensor import make_fx

def print_compile_fn(fx_module, args):
    return fx_module

fn = lambda x : x.sin().cos()
aot_fn = aot_function(fn, print_compile_fn)

x = torch.randn(4, 5, requires_grad=True)

print(aot_fn(x))

try:
    gm = make_fx(aot_fn)(x)
    gm.graph.print_tabular()
except Exception as e:
    print(e)
    raise e
```

### Versions

Latest master.

cc @ezyang @SherlockNoMad @zou3519 @Chillee @samdow
Repository: vscode
Issue: Limit the amount of shown inlay hints
Labels: feature-request,inlay-hints

For functions that take many integers (especially in tests), inlay hints are quite annoying:

![image](https://user-images.githubusercontent.com/2931520/183677205-fdca12f3-c61d-4013-8638-df6052341e9a.png)

In "normal" code, inlay hints are nice.

Maybe a setting "maximum amount of inlay hint characters per line" would be helpful.
Repository: go
Issue: x/sys/unix: Definition for O_PATH missing for most FreeBSD architectures
Labels: OS-FreeBSD,NeedsInvestigation,FeatureRequest,compiler/runtime

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.18.2 freebsd/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/dfr/.cache/go-build"
GOENV="/home/dfr/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="freebsd"
GOINSECURE=""
GOMODCACHE="/home/dfr/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="freebsd"
GOPATH="/home/dfr/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/freebsd_amd64"
GOVCS=""
GOVERSION="go1.18.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="cc"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/home/dfr/go/src/github.com/containers/podman/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3986639741=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

import "golang.org/x/sys/unix" and try to use unix.O_PATH on FreeBSD 13.1 or later

### What did you expect to see?

The program should compile 

### What did you see instead?

the program does not compile

### Notes

This symbol has been present in FreeBSD system headers since 13.1-RELEASE. The generated go code in x/sys/unix contains a definition for riscv in zerrors_freebsd_riscv64.go but the constant is missing for all other architectures. This symbol is not arch-dependent and should have the same value on all supported architectures.
Repository: tauri
Issue: [feat] Web Request Callbacks and Filtering
Labels: type: feature request

### Describe the problem

Tauri should expose a way to register a Rust callback to intercept and modify requests that the application in the web view makes, as part of navigation, resource loading, or via JavaScript API calls. Election has an API to do this here: https://www.electronjs.org/docs/latest/api/web-request

Applications can use this functionality to modify requests for their needs (adding and removing headers for example) as well as preventing access to sites outside the scope of the application, for security.

### Describe the solution you'd like

Electron has an API for this already that can serve as a base. Ideally, we can register two callbacks - one called with the request before it is sent and one called with the response after it is received. The callbacks should be passed the complete info about the request and response, and should be able to mutate or reject them.

### Alternatives considered

Delegate requests to the core application via either IPC calls or custom protocols. This requires that the inner page be written to use them though, which is not possible for third party sites, and does not address the use case of security hardening.

### Additional context

_No response_