sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: bitcoin
Issue: signed overflow in coinstats index
Labels: Brainstorming,Bug,UTXO Db and Indexes,RPC/REST/ZMQ

https://github.com/bitcoin/bitcoin/blob/6d4048468430d9d1fe5e7c5fcda13708879d1083/src/index/coinstatsindex.h#L33-L35
https://github.com/bitcoin/bitcoin/blob/6d4048468430d9d1fe5e7c5fcda13708879d1083/src/kernel/coinstats.h#L54-L59

The values:

 * `m_total_prevout_spent_amount`
 * `m_total_new_outputs_ex_coinbase_amount`
 * `m_total_coinbase_amount`

are all subject to overflowing an `int64_t` (ie, `CAmount`). This is visible in practice as of signet block 112516; with     `total_prevout_spent` rolling over to -92230771076.81494784 (from from 92232270378.54920553 BTC at block 112515). With debug builds, this will cause a crash due to the `-ftrapv` compiler option.

Making these just be per-block totals instead of cumulative totals should fix this in practice. I think that would require a full index rebuild, though?

Even then I think it would still be technically possible to overflow `m_block_prevout_spent_amount` or `m_total_new_outputs_ex_coinbase_amount` with a single block: you can fit over 15,000 65-byte transactions spending to `padding DROP TRUE` in a block, and if you start with a utxo containing 6.15M BTC and chain it through 15,000 txs, then that will overflow a signed 64 bit counter. That's not reproducible on regtest, though, since the halving schedule there limits the total supply to ~15,000 regtest-BTC, which means you need about 6.15M transactions to trigger the same overflow.

Since we don't actually expose the cumulative totals; I observed the values above by patching gettxoutsetinfo in rpc/blockchain to add:

```c++
/*line ~877*/    {RPCResult::Type::STR_AMOUNT, "total_prevout_spent", "Total amount of all prevouts spent up to this block"},
/*line ~981*/    block_info.pushKV("total_prevout_spent", ValueFromAmount(stats.total_prevout_spent_amount));
```
Repository: go
Issue: x/pkgsite: Code Block should show line numbers
Labels: NeedsFix,pkgsite

<!--
Please answer these questions before submitting your issue. Thanks!

If you would like to have your package removed, please file an issue at https://golang.org/s/pkgsite-package-removal.
-->
 
### What is the URL of the page with the issue?
 Example: https://pkg.go.dev/golang.org/x/sync/errgroup#Group.Wait
 
 
### What is your user agent?
 
<!-- 
You can find your user agent here:
https://www.whatismybrowser.com/detect/what-is-my-user-agent
-->
 [Mozilla/5.0 (X11; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0](https://developers.whatismybrowser.com/useragents/parse/?analyse-my-user-agent=yes)
 
 
### Screenshot
 
<!--
Please paste a screenshot of the page.
-->
![Screenshot from 2022-10-21 17-52-28](https://user-images.githubusercontent.com/11015077/197194705-5b08fd93-aba4-4aea-a8fb-bf776b59129c.png)
 
 
 
### What did you do?
 
<!--
If possible, provide a recipe for reproducing the error.
-->
Modify the example code, in this case, it was a bad code and panicked.
```go
package main

import (
	"fmt"
	"net/http"

	"golang.org/x/sync/errgroup"
)

func main() {
	g := new(errgroup.Group)
	var urls = []string{
		"http://www.golang.org/",
		"http://www.google.com/",
		"http://www.somestupidname.com/",
	}
	for _, url := range urls {
		// Launch a goroutine to fetch the URL.
		url := url // https://golang.org/doc/faq#closures_and_goroutines
		g.Go(func() error {
			// Fetch the URL.
			resp, err := http.Get(url)
			if err != nil {
				fmt.Println("error encountered")
				resp.Body.Close()
				return nil
			}
			fmt.Println("ignoring error if any")
			resp.Body.Close()
			return nil
		})
	}
	// Wait for all HTTP fetches to complete.
	if err := g.Wait(); err == nil {
		fmt.Println("Successfully fetched all URLs.")
	}
}
``` 

 
### What did you expect to see?
 Error message
```
Output:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x61cb7a]

goroutine 7 [running]:
main.main.func1()
	/tmp/sandbox1760300329/prog.go:25 +0x7a
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/tmp/gopath4274196458/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
	/tmp/gopath4274196458/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:72 +0xa5

```
It tells the line on which error occurred. But the code is not numbered, and hence it is difficult to determine the code line that threw error.
 
It would be helpful if the code blocks were numbered.
 
### What did you see instead?
Repository: go
Issue: proposal: io:  add CloserFunc and WriterAndCloser 
Labels: Proposal

can add CloserFunc and WriterAndCloser 

CloserFunc  is:
````go
   type CloserFunc  func() error
   
   func (fn CloserFunc) Close() error {
      return fn()
   }

 var _ io.Closer = CloserFunc(func() error {})
````



WriterAndCloser  is:
````go
type writeCloser struct {
	io.Writer
	io.Closer	
}

func WriterAndCloser(w io.Writer, c io.Closer) io.WriteCloser {
	return writeCloser{
		Writer: w,
		Closer: c,
	}
}
````

see:  https://github.com/search?q=CloserFunc+language%3Ago&type=code
Repository: storybook
Issue: [Bug]: memoized components show display name `[object Object]`
Labels: bug,needs triage

### Describe the bug

"Show code" view shows `[object Object]` as display name for `React.memo`ized components, for example:

```tsx
icon: <[object Object] fontSize="small" />,
```

### To Reproduce

```tsx
const Component = () => { /* ... */ };
Component.displayName = "Component";
export default React.memo(React.forwardRef(Component));
```

Story parameters:
```
docs: { source: { type: "dynamic", excludeDecorators: true } },
```

### System

_No response_

### Additional context

_No response_
Repository: ant-design
Issue: Popover remains visible when component tree is suspended
Labels: help wanted,Inactive

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/antd-reproduction-template-forked-kkd55u?file=/index.js)

### Steps to reproduce

1. Open Popover by clicking on the `Open Popover button`
2. Trigger suspense by clicking on the popover content button `Hide and load data`
3. See popover remaining visible while the component tree is suspended.

### What is expected?

The popover to be hidden. 

### What is actually happening?

The popover remains visible.

| Environment | Info |
| --- | --- |
| antd | 4.23.6 |
| React | 17 |
| System | Linux |
| Browser | Google Chrome |

---
React.Suspense provide a lifecycle so components can handle the display:none removal. This can be used to handle this: https://github.com/facebook/react/issues/14536

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: godot
Issue: ScriptEditor: Close scripts before deletion
Labels: bug,topic:editor

### Godot version

4.0 Beta3

### System information

Windows 10

### Issue description

If you directly delete a script that is open in the script editor it gets closed first and everything works fine.
If you delete a folder containing the script it is not closed and you get errors.

It might be worth looking into if similar problems arise when deleting folders with scenes and resources, deleting folders seems to be a bit wonky currently.

### Steps to reproduce

1. Create a folder
2. Put a script in it
3. Open it in the script editor
4. Delete the folder

### Minimal reproduction project

_No response_
Repository: storybook
Issue: [Bug]: deprecation warning migration for v7.0 won't work with MDX
Labels: bug,angular,mdx

### Describe the bug

Hi Storybook Team,

I would like to get your attention about a potential problem following the migration of MDX to the future v7.0.

Inside a MDX story, I would like to show two components. Using the following will work :
```
export const exampleA = () => ({ component: ExampleAComponent });

<Canvas>
  <Story name="First Component" height={"75px"}>
    {exampleA.bind({})}
  </Story>
</Canvas>

export const exampleB = () => ({ component: ExampleBComponent });

<Canvas>
  <Story name="Second Component" height={"75px"}>
    {exampleB.bind({})}
  </Story>
</Canvas>
```

Of course, there is a deprecation warning on it :

```
`component` story return value is deprecated, and will be removed in Storybook 7.0.
Instead, use `export const default = () => ({ component: AppComponent });`
or

export const Primary: Story = () => ({});
Primary.parameters = { component: AppComponent };

Read more at
- https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-angular-story-component).
- https://storybook.js.org/docs/angular/writing-stories/parameters
```

So, I switched to the other format like this : 

```
export const exampleA = () => ({});

<Canvas>
  <Story name="First Component" height={"75px"} parameters={{ component: ExampleAComponent }}>
    {exampleA.bind({})}
  </Story>
</Canvas>

export const exampleB = () => ({});

<Canvas>
  <Story name="Second Component" height={"75px"} parameters={{ component: ExampleBComponent }}>
    {exampleB.bind({})}
  </Story>
</Canvas>
```

But, after doing this, nothing will be displayed and the "Show code" button will be disabled.

It seems there is something broken or missing here, or a lack of documentation about it.

Thank you in advance for your attention :)

### To Reproduce

```shell
https://github.com/Nxtivision/storybook-mdx-not-working-v7.git
```


### System

```shell
Environment Info:
  System:
    OS: Windows 10 10.0.22000
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  Binaries:
    Node: 16.13.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.15 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.16.0 - ~\AppData\Roaming\npm\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (106.0.1370.52)
  npmPackages:
    @storybook/addon-actions: ^6.5.12 => 6.5.12
    @storybook/addon-docs: ^6.5.12 => 6.5.12
    @storybook/addon-essentials: ^6.5.12 => 6.5.12
    @storybook/addon-interactions: ^6.5.12 => 6.5.12
    @storybook/addon-links: ^6.5.12 => 6.5.12
    @storybook/angular: ^6.5.12 => 6.5.12
    @storybook/builder-webpack5: ^6.5.12 => 6.5.12
    @storybook/manager-webpack5: ^6.5.12 => 6.5.12
    @storybook/mdx2-csf: ^0.0.3 => 0.0.3
    @storybook/testing-library: ^0.0.13 => 0.0.13
```


### Additional context

_No response_
Repository: godot
Issue: .NET 6: Hot reload throws exceptions
Labels: bug,topic:editor,topic:dotnet

### Godot version

4.0 beta 3

### System information

Win 11

### Issue description

Applying method changes while debugging a C# project results in errors. The method still gets updated, but the resulting error can be seen in the hot reload output in the Output panel of Visual Studio.
`[Error] Applying updates failed: Microsoft.VisualStudio.HotReload.Components.DeltaApplier.ManagedDeltaApplierFailedToConnectException: Exception of type 'Microsoft.VisualStudio.HotReload.Components.DeltaApplier.ManagedDeltaApplierFailedToConnectException' was thrown.`

In Rider, this manifests itself as only being able to apply the changes once.
![image](https://user-images.githubusercontent.com/57505542/197228909-c04350d8-732a-472b-9ec7-66bf6e4dc456.png)


### Steps to reproduce

Create a new C# project and setup debugging.

In the .csproj: 
``` 
<PropertyGroup>
    <StartAction>Program</StartAction>
    <StartProgram>path to godot</StartProgram>
  </PropertyGroup>
```

launchSettings.json:
```
{
  "profiles": {
    "HotReloadTest": {
      "commandName": "Project",
      "commandLineArgs": "--path C:\\Projects\\HotReloadTest"
    }
  }
}
```

Then start debugging, change a method and apply the change.

### Minimal reproduction project

_No response_
Repository: storybook
Issue: [Bug]: array or object with JSX elements in context causes Storybook to hang indefinitely
Labels: bug,dependencies,react

### Describe the bug

Providing an array of JSX elements, or an object containing JSX elements, as the `value` in a context provider causes Storybook to hang indefinitely. The UI may load but it cannot be interacted with once you click on the story with the context issue.

This only happens with arrays/objects. Passing a JSX element as the `value` in context works fine.

Example code of adding context in a story (with an array): 
```js
const Template = (args) => (
  <FooContext.Provider value={[<div>Hi</div>]}>
    <FooComponent {...args} />
  </FooContext.Provider>
);
```

This also happens if the context is placed in decorators, e.g. (with an object):
```js
export default {
  ...csf,
  decorators: [
    (Story) => (
      <FooContext.Provider value={{ test: <div>Hi</div> }}>
        <FooComponent />
      </FooContext.Provider>
    )
  ]
}
```

One solution is to use the `storybook-react-context` add-on, however if there is something I have missed that is causing this issue I would welcome guidance on solving it without using an add-on.


### To Reproduce

```shell
https://github.com/alicnik/storybook-jsx-array-context-bug
```


### System

```shell
System:
    OS: macOS 12.6
    CPU: (8) x64 Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
  Binaries:
    Node: 16.18.0 - /usr/local/bin/node
    Yarn: 3.2.4 - /usr/local/bin/yarn
    npm: 8.19.2 - /usr/local/bin/npm
  Browsers:
    Chrome: 106.0.5249.119
    Firefox: 102.0.1
    Safari: 16.0
  npmPackages:
    @storybook/addon-docs: ^7.0.0-alpha.40 => 7.0.0-alpha.40 
    @storybook/addon-essentials: ^7.0.0-alpha.40 => 7.0.0-alpha.40 
    @storybook/addon-interactions: ^7.0.0-alpha.40 => 7.0.0-alpha.40 
    @storybook/addon-links: ^7.0.0-alpha.40 => 7.0.0-alpha.40 
    @storybook/react: ^7.0.0-alpha.40 => 7.0.0-alpha.40 
    @storybook/react-webpack5: ^7.0.0-alpha.40 => 7.0.0-alpha.40 
    @storybook/testing-library: ^0.0.13 => 0.0.13
```


### Additional context

_No response_
Repository: pytorch
Issue: Categorical fails simplex validation after its own normalisation on CUDA
Labels: module: distributions,triaged

### 🐛 Describe the bug

`torch.distributions.Categorical` fails on simplex validation after normalising the input probabilities. 
So far, I could only reproduce this bug with CUDA.

I have uploaded two tensors to reproduce the behaviour here: https://oc.embl.de/index.php/s/fAhBE8KESs0i6vm

```python
import torch

p = torch.load("fishy_tensor.pt")

torch.distributions.Categorical(p)  # fails with simplex check
torch.distributions.constraints.simplex.check(p) # yields all true
```

![image](https://user-images.githubusercontent.com/16120273/197239666-b1baf4fc-e94f-49b9-b3c1-7a7d447bc754.png)

I raised this issue in the forum already https://discuss.pytorch.org/t/distributions-categorical-fails-with-constraint-simplex-but-manual-check-passes/163209/3 

### Versions

## Environment
cudatoolkit 11.3.1 h9edb442_10 conda-forge
python 3.10.5 h582c2e5_0_cpython conda-forge
python_abi 3.10 2_cp310 conda-forge
pytorch 1.12.0 py3.10_cuda11.3_cudnn8.3.2_0 pytorch
pytorch-lightning 1.6.5 pypi_0 pypi
pytorch-mutex 1.0 cuda pytorch

complete env here: https://oc.embl.de/index.php/s/UwFFBFDJy6s71t0

cc @fritzo @neerajprad @alicanb @nikitaved
Repository: vscode
Issue: Add support for language-aware word wrap
Labels: feature-request,markdown,editor-wrapping

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
Requesting to reopen issue #94674 to add support for language-aware word wrap (also see #102999). As VS Code is becoming the Markdown editor of choice for many developers, improving the readability of wrapping list elements while editing Markdown documents, would improve the overall dev experience.

Currently, the closest you can get to achieving proper list alignment is setting `wrappingIndent` and `tabSize`, but unfortunately, that results in improper indentation on regular paragraphs.
```json
"[markdown]": {
  "editor.wordWrap": "on",
  "editor.wrappingIndent": "indent",
  "editor.tabSize": 2
},
```
Repository: stable-diffusion-webui
Issue: [Feature Request]: training parameters of textual inversion embedding  in a log file?
Labels: enhancement

### Is there an existing issue for this?

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

### What would your feature do ?

Adding training infos in a text file or in png or pt. file generated during training (Learning rate, number of vector per token used for embedding, number of input images, prompt ussed in case of png genration, etc..)

### Proposed workflow

1- feature should be accessible directly in the folder during creation of embedding of textual inversion


### Additional information

_No response_
Repository: flutter
Issue: Fix runtime comparison in glowing and stretching overscroll indicators
Labels: framework,f: scrolling,P2,team-framework,triaged-framework

Follow up to https://github.com/flutter/flutter/pull/113212

There are some inconsistencies in how we set and compare the type of scroll notification in the GlowingOverscrollIndicator and the StretchingOverscrollIndicator in each's respective _handleScrollNotification method.

There should be a case where this type check creates a bug, but we haven't identified it yet. Once we can, we can write a test to include with the patch. See more comments and context in https://github.com/flutter/flutter/pull/113212.
Repository: rust
Issue: Check that arguments are only moving locals or box contents in the mir verifier
Labels: T-compiler,A-MIR,F-unsized_fn_params,-Zvalidate-mir

See https://rust-lang.zulipchat.com/#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/stack.20slot.20reuse.20Q/near/305406997 for more context.
Repository: PowerToys
Issue: Add To Path Explorer Add-on
Labels: Idea-Enhancement,Needs-Triage

### Description of the new feature / enhancement

It would be really nice to be able to right click on a folder and choose "Add to Path Global" or "Add to Path User" and it would put it in the path on the computer.



### Scenario when this would be used?

Everything and their uncle isn't doing this automatically anymore and it's an anoyance having to do it manually every time. This would save devs especially a huge amount of time.

(flutter, kubernetes plugins, etc. etc.)

### Supporting information

_No response_
Repository: rust
Issue:  Check that move arguments are disjoint in the mir verifier
Labels: T-compiler,A-MIR,F-unsized_fn_params,-Zvalidate-mir

See https://rust-lang.zulipchat.com/#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/stack.20slot.20reuse.20Q/near/305409193 and https://github.com/rust-lang/rust/issues/103362.

Basically the check would disallow `foo(move _1, move _1)` (where `_1` is of any type) and `foo(move *_1, move *_1)` (where `_1` is a box).
Repository: pytorch
Issue: [JIT] Inconsistent handling of tracing dict output leads to assertion 
Labels: oncall: jit

### 🐛 Describe the bug

Repro: 
```python
import torch
from typing import Dict, List, Optional, Tuple

def impl(
    values: torch.Tensor,
) -> List[List[torch.Tensor]]:
    jt_tensors: List[List[torch.Tensor]] = []
    for i in range(2):
        jt_tensors.append([values[:], values[1:], values[2:], values[3:]])
    return jt_tensors

@torch.jit.script
def scripted_impl(
    keys: List[str],
    values: torch.Tensor,
) -> Dict[str, Tuple[torch.Tensor, torch.Tensor, torch.Tensor, Optional[torch.Tensor]]]:
    jt_tensors = impl(values)
    ret = torch.jit.annotate(
        Dict[str, Tuple[torch.Tensor, torch.Tensor, torch.Tensor, Optional[torch.Tensor]]],
        {k: (v[0], v[1], v[2], v[3]) for (k, v) in zip(keys, jt_tensors)},
    )
    return ret

def thing(values):
    return scripted_impl(["asdf", "fdsa"], values)

values = torch.rand((5))
traced_thing = torch.jit.trace(thing, (values,), strict=False)
```

The tracer seems like it tries to guess the return type based on the ivalue return type (https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/frontend/tracer.cpp#L293) and apparently it guesses wrong... perhaps there's a better way to do the annotations here, but I couldn't figure out a way to get around it.

### Versions

master branch
Repository: create-react-app
Issue: Build fails with warning The "path" argument must be of type string. Received null
Labels: needs triage,issue: bug report

I don't have reproducible for this as the project is private. However i'm using react-scripts 5.0.1 with typescript 4.8.4.

### Describe the bug

Build fails with:

```
❯ env CI=true npm run build

> packages.dev.bloomberg.com@1.0.0 build
> react-scripts build

Creating an optimized production build...

Treating warnings as errors because process.env.CI = true.
Most CI servers set it automatically.

Failed to compile.

The "path" argument must be of type string. Received null

The "path" argument must be of type string. Received null

The "path" argument must be of type string. Received null

The "path" argument must be of type string. Received null

```

There's no mention of what path and where though 🤔
Repository: stable-diffusion-webui
Issue: [Feature Request]: Option to smooth scroll the list of checkpoint (ckpt) files instead of quick page up/down. [When using mouse scroll wheel]
Labels: enhancement

### Is there an existing issue for this?

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

### What would your feature do ?

With the incorporation of Dreambooth many of us are switching between a large number of .ckpt files.  At the moment, when you get to the bottom (or top) of the list, and scroll the mouse wheel slowly the list quickly snaps and moves a full page (or almost). It makes it a little difficult to keep track when the filenames have cues to remind the user what token/class/etc to use.

Obviously a minor request, but for me the jumping has become a bit annoying. I'm hoping maybe this could tweaked so scrolling with the mouse doesn't cause a big jump when you have a large list of checkpoints. 



### Proposed workflow

1. Go to list of "Stable Diffusion Checkpoint" on the top left
2. Have a list a substantial amount of checkpoints so as take up more than the space allotted for them at any one time.
3. Try to slowly scroll the mouse wheel to the next check point up or down, and notice the rapid/jumpy change.



### Additional information

Thanks for all your efforts. Nothing big here, but would love for the mouse wheel response on scrolling that list to be tweaked.
Repository: stable-diffusion-webui
Issue: Batch up scale processes[Feature Request]: 
Labels: enhancement

### Is there an existing issue for this?

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

### What would your feature do ?

It would be  helpful if we were able to run multiple upscales consecutively. So, rather than Upscaler 1 and 2 it would be upscaler 1 then 2. 

### Proposed workflow

1. Go to extras > batch from directory
2. Select scale by amount
3. Select upscaler 1 model
4. Select upscaler 2 model
5. Select consecutive/sequence of up scalers
6. Click generate


### Additional information

_No response_