sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/go: linker repeatedly invoked for cached test results
Labels: NeedsInvestigation,GoCommand

Adding the following extra assertions to `cmd/go/testdata/script_build_cache_output.txt` causes the test to fail at the `! stderr 'link(\.exe"?)? -'` assertion:
```diff
--- c/src/cmd/go/testdata/script/build_cache_output.txt
+++ w/src/cmd/go/testdata/script/build_cache_output.txt
@@ -52,6 +52,25 @@ stderr '\d+ symbols' # from linker
 ! stderr 'p\.test( |\.exe"?)'
 stdout 'TEST' # from test

+# The gcflags above cause the compiler and linker to print diagnostic output,
+# but if we rebuild without those flags we should end up with a resulting test
+# binary with exactly the same contents, and thus the same ID.
+# The result of running that binary is already cached.
+go test -v -x p
+stdout 'TEST' # from test
+stdout '^ok\s+p\s+\(cached\)$' # from cmd/go
+stderr 'compile( |\.exe"?)'
+stderr 'link(\.exe"?)? -'
+stderr 'p\.test( |\.exe"?)'
+
+# If we run the test one more time, we shouldn't need to compile or link anything,
+# because we know that the ID will be the same.
+go test -v -x p
+stdout 'TEST' # from test
+stdout '^ok\s+p\s+\(cached\)$' # from cmd/go
+! stderr 'compile( |\.exe"?)'
+! stderr 'link(\.exe"?)? -'
+! stderr 'p\.test( |\.exe"?)'

 -- lib.go --
 package p
```

Note that both `ok	p	(cached)` assertions are passing, so this means that under some circumstances we are printing a test's output as “cached” but re-invoking the linker for the test anyway. There is some special-case code in `cmd/go/internal/test` (added in [CL 75631](https://golang.org/cl/75631)) that attempts to prevent exactly this situation; it isn't yet clear to me why it isn't working.

(CC @matloob)
Repository: pytorch
Issue: Feature request: Grid sample on complex tensors with float grid
Labels: feature,module: nn,triaged,module: complex,needs research,module: interpolation

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->
Support on grid_sample on complex tensors with float grids will be great!

## Motivation

<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->

When I do something about simulation, I need bilinear interpolation sampling on complex tensors with real grid sampling coordinates, which is something like this

```python
c_tensor = torch.ones(3,3, dtype = torch.cfloat)
c = c_tensor.reshape(1, 1, 3, 3)
coord = torch.tensor([0.5, 0.5]).reshape(1, 1, 1, 2)
sampled_values = F.grid_sample(c, coord, align_corners=True)
```

but this will give a runtime error
`RuntimeError: grid_sampler(): expected input and grid to have same dtype, but input has c10::complex<float> and grid has float`


## Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->

I can do something like below to "get around this error", but another problem will occur, which is about strides.
```python
c_tensor = torch.ones(3,3, dtype = torch.cfloat)
c = c_tensor.reshape(1, 3, 3)
coord = torch.tensor([0.5, 0.5]).reshape(1, 1, 1, 2)
c = torch.view_as_real(c)
c = c.permute(0, 3, 1, 2)
sampled_values = F.grid_sample(c, coord, align_corners=True)
sampled_values = sampled_values.permute(0, 2, 3, 1)
sampled_values = torch.view_as_complex(sampled_values)
```
The error is 
`RuntimeError: Tensor must have a stride divisible by 2 for all but last dimension`.

I think this issue is a bit tricky to fix, and I think the best way to avoid this issue is to support grid sampling complex tensors with float sampling coordinates.


cc @albanD @mruberry @jbschlosser @walterddr @ezyang @anjali411 @dylanbespalko @Lezcano @nikitaved
Repository: svelte
Issue: Trojan Source Attack checks
Labels: compiler

### Describe the problem

I just discovered this and it looks like a potential attack vector.

A TLDR is something along the lines of using unicode characters to reorder source tokens enabling the attacker to "say" one thing but execute something else. More here: https://www.trojansource.codes

Selected the highest priority importance, not entirely sure that one makes sense though :shrug

### Describe the proposed solution

Quoting the Trojan Codes website:

> Compilers, interpreters, and build pipelines supporting Unicode should throw errors or warnings for unterminated bidirectional control characters in comments or string literals, and for identifiers with mixed-script confusable characters.

### Alternatives considered

I am not 100% this is an issue, maybe someone more knowledgable can chime in?

### Importance

i cannot use svelte without it
Repository: kubernetes
Issue: StatefulSetStatus CurrentRevision doesn't update with OnDelete update strategy
Labels: kind/bug,sig/apps,triage/accepted

### What happened?

This is the same as https://github.com/kubernetes/kubernetes/issues/73492

When using the OnDelete update strategy, after all the pods from the old revision are deleted the CurrentRevision doesn't get updated in the Status

### What did you expect to happen?

Once the old revision pods have all been deleted the CurrentRevision should be updated.

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

Create a statefulset with >1 replicas and OnDelete update strategy.  Make a change to the Spec, then delete all the current pods.

### Anything else we need to know?

I have reopened the issue so I can work on a fix for it

### Kubernetes version

<details>

```console
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:59:11Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1+k3s1", GitCommit:"75dba57f9b1de3ec0403b148c52c348e1dee2a5e", GitTreeState:"clean", BuildDate:"2021-05-21T16:12:29Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}
```

</details>


### Cloud provider

None

### OS version

_No response_

### Install tools

_No response_

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

_No response_

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

_No response_
Repository: go
Issue: crypto/x509: unable to parse Attribute Certificate
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.17.1 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes


### What did you do?

Attempt to parse [Attribute Certificate](https://en.wikipedia.org/wiki/Authorization_certificate) uising `"crypto/x509"`

- [An Internet Attribute Certificate Profile for Authorization](https://datatracker.ietf.org/doc/html/rfc5755)

Here is the repro:

https://play.golang.org/p/2Ngkmat3bqe

Note, i got the given [attribute certificate](https://raw.githubusercontent.com/salrashid123/attribute_certificate/main/tpm_reference_platform_cert.pem)  from the sample in the [TCG Platform Certificate Profile](https://trustedcomputinggroup.org/wp-content/uploads/IWG_Platform_Certificate_Profile_v1p1_r19_pub_fixed.pdf) (see the appendix).  I also saw used java's bouncycastle provider to genrate the same [here](https://github.com/salrashid123/attribute_certificate) in  my own repo

### What did you expect to see?

Proper parsing of the structure

### What did you see instead?

`x509: inner and outer signature algorithm identifiers don't match`

I suspect that error isn't accurately reflecting the root cause here, IMO

---

Some additional context. 

- openssl does not yet support this:  https://github.com/openssl/openssl/issues/14648

- maybe related https://github.com/golang/go/issues/47689

- [ASN parsed](https://gist.github.com/salrashid123/70086c699b67a812197d3d1bbf51de74) form of the same cert
Repository: pytorch
Issue: Is there a pre-built pytorch package for CUDA 10.1?
Labels: module: build,triaged

It seems the latest pytorch only has pre-built packages for CUDA 10.2/11.1/11.3.
Does that means we need to compile from source if we want to have pytorch work on previous CUDA versions like 10.1 or there is a pre-built package somewhere?

---------
Running `conda search pytorch=1.10.0 -c pytorch` gives
```
# Name                       Version           Build  Channel
pytorch                       1.10.0     py3.6_cpu_0  pytorch
pytorch                       1.10.0 py3.6_cuda10.2_cudnn7.6.5_0  pytorch
pytorch                       1.10.0 py3.6_cuda11.1_cudnn8.0.5_0  pytorch
pytorch                       1.10.0 py3.6_cuda11.3_cudnn8.2.0_0  pytorch
pytorch                       1.10.0     py3.7_cpu_0  pytorch
pytorch                       1.10.0 py3.7_cuda10.2_cudnn7.6.5_0  pytorch
pytorch                       1.10.0 py3.7_cuda11.1_cudnn8.0.5_0  pytorch
pytorch                       1.10.0 py3.7_cuda11.3_cudnn8.2.0_0  pytorch
pytorch                       1.10.0     py3.8_cpu_0  pytorch
pytorch                       1.10.0 py3.8_cuda10.2_cudnn7.6.5_0  pytorch
pytorch                       1.10.0 py3.8_cuda11.1_cudnn8.0.5_0  pytorch
pytorch                       1.10.0 py3.8_cuda11.3_cudnn8.2.0_0  pytorch
pytorch                       1.10.0     py3.9_cpu_0  pytorch
pytorch                       1.10.0 py3.9_cuda10.2_cudnn7.6.5_0  pytorch
pytorch                       1.10.0 py3.9_cuda11.1_cudnn8.0.5_0  pytorch
pytorch                       1.10.0 py3.9_cuda11.3_cudnn8.2.0_0  pytorch
```

cc @malfet @seemethere
Repository: pytorch
Issue: test_jit_fuser_legacy and test_jit_fuser_te are failing with SIGIOT
Labels: high priority,triage review,oncall: jit,module: tests,NNC

See https://github.com/pytorch/pytorch/runs/4073239154?check_suite_focus=true and https://github.com/pytorch/pytorch/runs/4073239353?check_suite_focus=true for two recent examples.

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @mruberry
Repository: pytorch
Issue: MultiHeadAttention in quantizable seems incorrect with batch_first=True
Labels: oncall: quantization,low priority,triaged

In [this code](https://github.com/pytorch/pytorch/blob/c4bf196334bea0579b4ce6083b292be8712c7561/torch/nn/quantizable/modules/activation.py#L447), if current mode is batch_first, the view(bsz, tgt_len, self.embed_dim) will concatenate wrong tensors to form the [bsz, tgt_len, embed_dim] tensors from [bsz*num_head, tgt_len, head_dim] tensor. The reason is that emb_size will be formed by concatenating tensors along dim(1) (tgt_len) dimension. In theory, it should be copied from dim(0) since that is where the additional heads lie. I think the whole operation should first transpose by doing attn_output.transpose(0,1) then do the view(). Just like how it is done [here](https://github.com/pytorch/pytorch/blob/c4bf196334bea0579b4ce6083b292be8712c7561/torch/nn/functional.py#L5207).



cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel @jbschlosser @bhosmer @cpuhrsch @erichan1 @drisspg
Repository: TypeScript
Issue: Inconsistent order of properties inferred from a generic type
Labels: Bug,Domain: Declaration Emit

# Bug Report

### 🔎 Search Terms

inconsistent properties order
fields order

### 🕗 Version & Regression Information

4.4.4

### Description

We noticed that the resulting *.d.ts sometimes mention the properties of some types in random order, and this order changes every time a `tsc --watch` build unfreezes (i.e. it's not stable). Our build system consumes tsc output from multiple monorepo projects and pipes it to other different tools, so a change in a *.d.ts file whilst in practice it should've not been changed triggers some excess rebuilds.

**The effect is hard to reproduce** (and especially hard to reproduce in a sandbox), so I'll try my best to provide all the info I have collected having low hopes. (But my only hope is that someone from TS engineers has a quick idea on where the reordering might come from.)

So this is the correct order of properties in the inferred type as shown by VSCode (**externalID - assignee - completed**):

![image](https://user-images.githubusercontent.com/46383452/139770339-6bae9c16-630a-49f1-bd60-3a8b84c9646b.png)

And this is what I see in *.d.ts file during the initial build with --watch (incorrect order, **externalID - name - dueAt**):

![image](https://user-images.githubusercontent.com/46383452/139769406-a324e96e-ceab-412a-a7a1-f8a0276f5630.png)

This is what's there after a watch-build unfroze when I changed some unrelated file (another incorrect order, **externalID - name - assignee**, the 3rd variant):

![image](https://user-images.githubusercontent.com/46383452/139769418-c0dba4d7-159f-4155-a1c8-58cadaa36bf2.png)

Here is an extraction from the source code; I can't unfortunately sandbox it, so trying my best (notice IOValidatedFunc):

```ts
export default function IO<TInputLax extends object, TOutputLax extends object>(
  name: string,
  InputSchema: InputStruct<TInputLax>,
  OutputSchema: OutputStruct<TOutputLax>
) {
  function wrapper<TRest extends any[]>(
    func: IOPassedFunc<PartialToUndefined<TInputLax>, TOutputLax, TRest>
  ): IOValidatedFunc<TInputLax, TOutputLax, TRest> { ... }
  ...
  return wrapper;
}

...

// Superstruct library; it provides the correct TS typing from a validators structure.
UpdateTaskIO = IO(
  "UpdateTaskIO",
  object({
    externalID: string(),
    assignee: optional(nullable(string())),
    completed: optional(boolean()),
    dueAt: optional(nullable(JsonDate())),
    memberships: optional(
      array(
        object({
          project: string(),
          section: optional(string()),
        })
      )
    ),
    name: optional(trimmed(string())),
    notes: optional(string()),
    tags: optional(array(string())),
  }),
  NodeOutputSchema
);

...

override run = UpdateTaskIO(async (input) => { ... });
```

### 🙁 Actual behavior

The order of fields in *.d.ts file surprisingly changes when watch-building an unrelated file modification.

### 🙂 Expected behavior

*.d.ts content keeps unchanged if the source code is unchanged.
Repository: pytorch
Issue: TSAN issue in autograd "set_next_edges"
Labels: module: autograd,triaged,actionable,module: sanitizers

## 🐛 Bug

Complete TSAN trace: https://gist.github.com/pritamdamania87/2bc7e2e44e0a32e51fdad30d21357e7f

## To Reproduce

Steps to reproduce the behavior:

Run `test_trainer_ps_sparse` from `test_tensorpipe_agent.py` with TSAN.


cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7
Repository: create-react-app
Issue: ./src/App.js Module not found: Can't resolve './components/KYCContainer' in '/home/ec2-user/environment/kyc-app/src'
Labels: stale

Hello, i keep getting this error, i have tried reinstalling npm but nothing is working.

![BBB](https://user-images.githubusercontent.com/48441196/139778823-7b57f365-7143-4515-b9ee-8263414777e0.PNG)


This is my code for ./src/App.js

import React from 'react';
import { withAuthenticator} from '@aws-amplify/ui-react';

import './App.css';

import Amplify from 'aws-amplify';
import awsconfig from './aws-exports';
import KYCContainer from './components/KYCContainer'

Amplify.configure(awsconfig);



function App() {
  return (
    <div>
        <KYCContainer />
    </div>
  );
}

export default withAuthenticator(App);
Repository: flutter
Issue: Unable to lookup `PageStorage` when it exists above the `Navigator`
Labels: framework,f: routes,P2,team-framework,triaged-framework

I would like to have a single `PageStorage`, above my `MaterialApp` or `Navigator`, that can act as a global store for views.

For some reason, if I place my `PageStorage` widget outside of a page route, then I can not access it. I'm guessing this is because there is a PageStorage element on the Route, and there is no equivalent of `Navigator.of(context, rootNavigator:  true)`.

```
final bucket = PageStorageBucket();
class PageStorageIssue extends StatefulWidget {
  @override
  State<PageStorageIssue> createState() => _PageStorageIssueState();
}

class _PageStorageIssueState extends State<PageStorageIssue> {
  @override
  void initState() {
    super.initState();
    bucket.writeState(context, 'hello', identifier: 'foo');
  }

  @override
  Widget build(BuildContext context) => PageStorage( // I can never reach this widget
        bucket: bucket,
        child: MaterialApp(
          home: HomePage(),
        ),
      );
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // this prints null
    print(PageStorage.of(context)?.readState(context, identifier: 'foo'));
    return PageStorage( // I need to add PageStorage to here in order to find my bucket
        bucket: bucket,
        child: Builder(builder: (context) {
          // this correctly find the bucket
          print(PageStorage.of(context)?.readState(context, identifier: 'foo'));
          return Placeholder();
        }));
  }
}
```

This is a pain because I need to add a `PageStorage` widget to every single top level page in the app, rather than just being able to lookup to one shared parent.
Repository: flutter
Issue: The framework should caution you against nesting scroll views that go in the same axis direction
Labels: framework,f: scrolling,P2,team-framework,triaged-framework

For example, the following code should trip some kind of assert:

```dart
return ListView.builder(
  children: <Widget>[
     SingleChildScrollView(child: SizedBox(height: 200)),
     SizedBox(height: 200),
  ],
);
```

Although it would be fine if the `SingleChildScrollView` specified a direction different than the `ListView`.
Repository: rust
Issue: The carry in signed carrying_mul on integers should be unsigned
Labels: T-libs-api,C-bug,T-libs

<!--
When using carrying_mul to chain multiplies on signed integers, you can get unexpected behavior due to the carry being signed.
-->

I tried this code:

```rust
// use signed carry_mul to chain two multiplies (x*y) + (x*y) >> 64
let carry: i32 = 0;
let x: i32 = 200000;
let y: i32 = 100000;
let (carry, prod) = x.carrying_mul(y, carry);
let (carry, prod) = x.carrying_mul(y, carry);

// do the calculation with larger integers
let large = i64::from(x) * i64::from(y);
let carry = large - ((large>>32)<<32);
let expected = ((large + carry)>>32) as i32;

assert_eq!(expected, prod);
```

I expected to see this happen: I expected the "prod" to be 5.

Instead, this happened: The product is 4 due to the carry in the first calculation being negative (overflowing) causing it to accumulate incorrectly.

### Meta
<!--
This is on a VERY recently updated nightly (as in an hour ago).
-->

`rustc --version --verbose`:
```
rustc 1.58.0-nightly (db062de72 2021-11-01)
binary: rustc
commit-hash: db062de72b0a064f45b6f86894cbdc7c0ec68844
commit-date: 2021-11-01
host: x86_64-pc-windows-msvc
release: 1.58.0-nightly
LLVM version: 13.0.0
```


</p>
</details>
Repository: nvm
Issue: Raspberry PI and old node versions
Labels: OS: Raspberry Pi,installing node,pull request wanted

The following errors occurred when installing old node versions (simple `nvm install $VERSION`) on an RPi4 with the default Raspbian flavor of Linux:

- [ ] 0.12 (nvm tries v0.12.18)
- [ ] 0.8 (nvm tries v0.8.28 -- same error but different line numbers)

```
$>./configure --prefix=/home/pi/.nvm/versions/node/v0.12.18 --without-snapshot<
Traceback (most recent call last):
  File "./configure", line 1009, in <module>
    configure_node(output)
  File "./configure", line 539, in configure_node
    o['variables']['gcc_version'] = 10 * cc_version[0] + cc_version[1]
IndexError: tuple index out of range
```

- [ ] 0.6 (nvm tries v0.6.21)

```
/usr/bin/g++ -o obj/release/accessors.o -c -fno-rtti -fno-exceptions -Wall -W -Wno-unused-parameter -Wnon-virtual-dtor -Wno-abi -pedantic -mfloat-abi=softfp -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -DCAN_USE_VFP_INSTRUCTIONS -DUSE_EABI_HARDFLOAT=0 -DV8_TARGET_ARCH_ARM -DENABLE_DEBUGGER_SUPPORT -I/home/pi/.nvm/.cache/src/node-v0.6.21/files/deps/v8/src /home/pi/.nvm/.cache/src/node-v0.6.21/files/deps/v8/src/accessors.cc
In file included from /usr/include/features.h:448,
                 from /usr/include/arm-linux-gnueabihf/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from /home/pi/.nvm/.cache/src/node-v0.6.21/files/deps/v8/src/../include/v8stdint.h:33,
                 from /home/pi/.nvm/.cache/src/node-v0.6.21/files/deps/v8/src/../include/v8.h:41,
                 from /home/pi/.nvm/.cache/src/node-v0.6.21/files/deps/v8/src/v8.h:52,
                 from /home/pi/.nvm/.cache/src/node-v0.6.21/files/deps/v8/src/accessors.cc:28:
/usr/include/arm-linux-gnueabihf/gnu/stubs.h:7:11: fatal error: gnu/stubs-soft.h: No such file or directory
 # include <gnu/stubs-soft.h>
           ^~~~~~~~~~~~~~~~~~
compilation terminated.
scons: *** [obj/release/accessors.o] Error 1
scons: building terminated because of errors.
Waf: Leaving directory `/home/pi/.nvm/.cache/src/node-v0.6.21/files/out'
Build failed:  -> task failed (err #2): 
        {task: libv8.a SConstruct -> libv8.a}
```
Repository: pytorch
Issue: torch.jit.script fails to find attribute '_modules' of nn.Module
Labels: oncall: jit

## 🐛 Bug

I have a model using `self.add_module` from `nn.Module`, and the forward function is designed by calling `self._module`. However the torch.jit.script fails to parse the code.

## To Reproduce

Run the following code:
``` python
import torch
import torch.nn as nn


class Demo1(nn.Module):
    def __init__(self):
        super().__init__()
        self.add_module('linear',nn.Linear(3, 64, bias=True))

    def forward(self, x):
        for module in self._modules.values():
            x = module(x)
        return x

if __name__ == '__main__':
    model = Demo1()
    script_module = torch.jit.script(model)
```
And the error is:
```
Traceback (most recent call last):
  File "/home/jiahang/working/test_torch_jit.py", line 29, in <module>
    script_module = torch.jit.script(model)
  File "/home/jiahang/anaconda3/envs/py36/lib/python3.6/site-packages/torch/jit/_script.py", line 1097, in script
    obj, torch.jit._recursive.infer_methods_to_compile
  File "/home/jiahang/anaconda3/envs/py36/lib/python3.6/site-packages/torch/jit/_recursive.py", line 412, in create_script_module
    return create_script_module_impl(nn_module, concrete_type, stubs_fn)
  File "/home/jiahang/anaconda3/envs/py36/lib/python3.6/site-packages/torch/jit/_recursive.py", line 478, in create_script_module_impl
    create_methods_and_properties_from_stubs(concrete_type, method_stubs, property_stubs)
  File "/home/jiahang/anaconda3/envs/py36/lib/python3.6/site-packages/torch/jit/_recursive.py", line 355, in create_methods_and_properties_from_stubs
    concrete_type._create_methods_and_properties(property_defs, property_rcbs, method_defs, method_rcbs, method_defaults)
RuntimeError: 
Module 'Demo1' has no attribute '_modules' :
  File "/home/jiahang/working/test_torch_jit.py", line 13
    def forward(self, x):
        for module in self._modules.values():
                      ~~~~~~~~~~~~~ <--- HERE
            x = module(x)
        return x
```

## Environment

 - PyTorch Version (e.g., 1.0): 1.9.0
 - OS (e.g., Linux): windows 10 WSL
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source):
 - Python version: 3.6.10
Repository: vscode
Issue: Implement eluded text
Labels: feature-request,editor-core