sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [feature request] Caching allocator diagnostics and memory allocation tracing/visualization
Labels: feature,module: memory usage,triaged

Would be cool to peek into the state of the caching allocator on things like:
- [x] Total cached memory
- [x] Total currently used memory, referenced by Tensors
- [x] Forced free of unused segments

- [ ] Tracing of memory allocations (along with some measure of fragmentation) and deallocations (both logical and physical). Would be useful for custom anasysis scripts and for understanding a reason of OOM (fragmentation or actual lack of memory)
- [ ] Stats about currently existing tensors (if possible, otherwise with a full trace one implement this post-hoc): type, sizes, gpu device. if we had a way to dump timestamp of allocation, would be cool too (would allow to track sort of reliably memory leaks)
- [ ] Dump information of all existing tensors / storages with refcounts, so that an easy vis of fragmentation can be done (hopefully with annotation of what required them for backward)
- [ ] Built-in minimal tool for visualization of used memory (cached memory / used memory) into an SVG/HTML string
- [ ] Arena allocators (memfree in one go, optionally mempreallocation in one go with upper memlimit, configurable block sizes, per-allocator stats on existing tensors referencing memory, optional support for CUDA Unified Memory)

With caching allocaotr it's hard to understand sometimes what's happening with memory since after some big allocations / deallocations memory on nvidia-smi always stays high and doesn't reflect actual usage.
Repository: neovim
Issue: Rendering bug when nvim_eval request received during typing multiline prompt
Labels: bug,channels-rpc,event-loop,display

- `nvim --version`: 33ca9f711e9a80df8edfc3e5c7519fb5fb7fff2b
- Vim (version: ) behaves differently? not applicable
- Operating system/version: Gentoo linux
- Terminal name/version: not applicable, functional tests’ environment

### Steps to reproduce

Consider the following tests put inside `test/functional/eval/input_spec.lua`, run with 5x25 screen from #6480:

```lua
  it('very long command', function()
    feed([[:oaethusoetanh unsoeaht unsoeaht uoesah utoeansu hoeatnsuh snoaehu ntoeahu saoeth unaoe]])
    screen:snapshot_util()
    helpers.wait()
    screen:snapshot_util()
  end)
  it('two-line command', function()
    feed([[:oaethusoetanh unsoeaht unsoeaht ]])
    screen:snapshot_util()
    helpers.wait()
    screen:snapshot_util()
  end)
```

### Actual behaviour

```lua
-- Results from the first test:
-- Normal:
screen:expect([[
  {EOB:~                        }|
  :oaethusoetanh unsoeaht u|
  nsoeaht uoesah utoeansu h|
  oeatnsuh snoaehu ntoeahu |
  saoeth unaoe^             |
]])
-- After wait:
screen:expect([[
  :oaethusoetanh unsoeaht u|
  nsoeaht uoesah utoeansu h|
  oeatnsuh snoaehu ntoeahu |
  :oaethusoetanh unsoeaht u|
  nsoeaht uoes^ah utoeansu  |
]])
-- Results from the second test:
-- Normal:
screen:expect([[
  {EOB:~                        }|
  {EOB:~                        }|
  {EOB:~                        }|
  :oaethusoetanh unsoeaht u|
  nsoeaht ^                 |
]])
-- After wait:
screen:expect([[
  {EOB:~                        }|
  {EOB:~                        }|
  :oaethusoetanh unsoeaht u|
  :oaethusoetanh unsoeaht u|
  nsoeaht ^                 |
]])
```

### Expected behaviour

No changes between “Normal” and “After wait” results: all `wait()` is doing is sending one `nvim_eval('1')` request. If I am not mistaking, this should be a valid request from some remote plugin which may come at any time.

Found when exploring my workarounds for #6480.

---

BTW, here are results for completely not fitting command:

```lua
  it('not fitting command', function()
    feed([[:oaethusoetanh unsoeaht unsoeaht uoesah utoeansu hoeatnsuh snoaehu ntoeahu saoeth unaoeouoaenuoetans unsoeah uoeasntu hoeatnsu hnoeashu oeahus eohatnu htnsoeahtu oeatnshu htoeahtsun oeathnsuoehtns htnsuoaetns uhoeatuhtns eoahtnsau hnaoesuhsnt ao]])
    screen:snapshot_util()
    helpers.wait()
    screen:snapshot_util()
  end)
-- Normal:
screen:expect([[
  :oaethusoetanh unsoeaht u|
  nsoeaht uoesah utoeansu h|
  oeatnsuh snoaehu ntoeahu |
  saoeth unaoeouoaenuoetans|
   unsoeah uoeasntu hoeatn^ |
]])
-- After wait:
screen:expect([[
  :oaethusoetanh unsoeaht u|
  nsoeaht uoesah utoeansu h|
  oeatnsuh snoaehu ntoeahu |
  saoeth unaoeouoaenuoetans|
  :oaethusoetanh unsoeaht ^ |
]])
```

I would not say that either “Normal” or “After wait” results are particularly good, but not sure whether it is worth fixing. I never had such long commands, but I did have written multiline commands.
Repository: go
Issue: cmd/compile: inlining isn't performed on generated init functions 
Labels: early-in-cycle,compiler/runtime

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?

go version devel +c061f51 Wed May 10 20:19:50 2017 +0000 linux/amd64

### What operating system and processor architecture are you using (`go env`)?

amd64/linux

### What did you do?
```
package main

import "fmt"

func double(x int) int {
	return x * 2
}

var Y = []int{double(1), double(2), double(3)}

func main() {
	fmt.Println(Y[0])
}
```
```
$ go build -gcflags="-m" -o test test.go && go tool objdump -s main.init test
# command-line-arguments
./test.go:5:6: can inline double
./test.go:12:15: Y[0] escapes to heap
./test.go:12:13: main ... argument does not escape
TEXT main.init(SB) <autogenerated>
  <autogenerated>:1	0x481700		64488b0c25f8ffffff	MOVQ FS:0xfffffff8, CX			
  <autogenerated>:1	0x481709		483b6110		CMPQ 0x10(CX), SP			
  <autogenerated>:1	0x48170d		0f8694000000		JBE 0x4817a7				
  <autogenerated>:1	0x481713		4883ec18		SUBQ $0x18, SP				
  <autogenerated>:1	0x481717		48896c2410		MOVQ BP, 0x10(SP)			
  <autogenerated>:1	0x48171c		488d6c2410		LEAQ 0x10(SP), BP			
  <autogenerated>:1	0x481721		0fb605bcd80a00		MOVZX 0xad8bc(IP), AX			
  <autogenerated>:1	0x481728		3c01			CMPL $0x1, AL				
  <autogenerated>:1	0x48172a		760a			JBE 0x481736				
  <autogenerated>:1	0x48172c		488b6c2410		MOVQ 0x10(SP), BP			
  <autogenerated>:1	0x481731		4883c418		ADDQ $0x18, SP				
  <autogenerated>:1	0x481735		c3			RET					
  <autogenerated>:1	0x481736		7507			JNE 0x48173f				
  <autogenerated>:1	0x481738		e80344faff		CALL runtime.throwinit(SB)		
  <autogenerated>:1	0x48173d		0f0b			UD2					
  <autogenerated>:1	0x48173f		c6059ed80a0001		MOVB $0x1, 0xad89e(IP)			
  <autogenerated>:1	0x481746		e895fcffff		CALL fmt.init(SB)			
  test.go:9		0x48174b		48c7042401000000	MOVQ $0x1, 0(SP)			
  test.go:9		0x481753		e8e8feffff		CALL main.double(SB)			
  test.go:9		0x481758		488b442408		MOVQ 0x8(SP), AX			
  test.go:9		0x48175d		488905acda0a00		MOVQ AX, 0xadaac(IP)			
  test.go:9		0x481764		48c7042402000000	MOVQ $0x2, 0(SP)			
  test.go:9		0x48176c		e8cffeffff		CALL main.double(SB)			
  test.go:9		0x481771		488b442408		MOVQ 0x8(SP), AX			
  test.go:9		0x481776		4889059bda0a00		MOVQ AX, 0xada9b(IP)			
  test.go:9		0x48177d		48c7042403000000	MOVQ $0x3, 0(SP)			
  test.go:9		0x481785		e8b6feffff		CALL main.double(SB)			
  test.go:9		0x48178a		488b442408		MOVQ 0x8(SP), AX			
  test.go:9		0x48178f		4889058ada0a00		MOVQ AX, 0xada8a(IP)			
  <autogenerated>:1	0x481796		c60547d80a0002		MOVB $0x2, 0xad847(IP)			
  <autogenerated>:1	0x48179d		488b6c2410		MOVQ 0x10(SP), BP			
  <autogenerated>:1	0x4817a2		4883c418		ADDQ $0x18, SP				
  <autogenerated>:1	0x4817a6		c3			RET					
  <autogenerated>:1	0x4817a7		e8e4d1fcff		CALL runtime.morestack_noctxt(SB)	
  <autogenerated>:1	0x4817ac		e94fffffff		JMP main.init(SB)			
```
### What did you expect to see?

No calls to main.double
Repository: react
Issue: [RFC] onChange -> onInput, and don't polyfill onInput for uncontrolled components
Labels: Component: DOM,Type: Discussion,Type: Breaking Change,React Core Team

`onChange` is a nicer name for what `onInput` does and the fact that it has propagated up to other high-level components as the default name is much nicer than `onInput` as a high level event name.

Generally it has been helpful for the many new-comers to React that don't know the DOM well (which is a lot more than the inverse). However, that doesn't change the fact that it can be confusing for people that are familiar.

Unfortunately, changing it now would cause confusion for everyone that already knows React.

The reason I'd like to change it now is because I'd like to get away from polyfilling it for __uncontrolled__ components. This use case is filled with all kinds of imperative code which leads to edge cases. E.g. reading/setting `e.target.value` or reading/setting `ref.value`.

When you use __controlled__ components you shouldn't need to touch them imperatively and therefore won't hit the edge cases. Ideally we should get away from reading from `e.target.value` and instead just pass the `value` directly to the event handler.

## Proposal:

__Controlled Components__

- `onInput`: Polyfilled and works like `onChange` does today. It is allowed to over-fire many events even if nothing changed. May have special Fiber rules regarding synchronous flushing. _Optional: Pass `value` as second arg._
- `onChange`: Works like `onInput` for one version but warns about being deprecated and suggests switching to `onInput`. In next version it works like the browser but still warns and tells you to use `onInput` forever.

_Optional: Add a getter/setter on DOM `.value` in development mode and warn if this is used directly._

__Uncontrolled Components__

- `onInput`: Not polyfilled. Works however the browser works. Warns about browser differences if you don't also specify `onClick`, `onKeyDown` and/or `onKeyUp`. The warnings suggests implementing those listeners to cover more edge cases, or switch to a controlled component.
- `onChange`: Not polyfilled. Works however the browser works.
Repository: rust
Issue: Collision of Borrow::borrow() and RefCell::borrow()
Labels: C-enhancement,A-diagnostics,T-compiler

The trait `std::borrow::Borrow` and type `std::rc::RefCell` both have a method `borrow()`. This leads to ambiguity, possibly hard-to-understand errors and most importantly breaking unrelated code by adding `use std::borrow::Borrow;`. 

Consider the following code:
```rust
use std::rc::Rc;
use std::cell::RefCell;
// Uncommenting causes compile error
//use std::borrow::Borrow;

pub struct S {
	flag : bool
}

type SCell = Rc<RefCell<S>>;

fn main() {
    // Type annotations just for clarity
    let s : SCell = Rc::new(RefCell::new(S {flag: false}));
    let sb : &S = &s.borrow();
    println!("{:?}", sb.flag);
}
```
[(Rust playground link)](https://play.rust-lang.org/?gist=261852bc9a7c357851f32b4f858209f3&version=stable&backtrace=0)

This code compiles and works as intended. But when you add `use std::borrow::Borrow;`, the compiler complains:

```
rustc 1.17.0 (56124baa9 2017-04-24)
error[E0277]: the trait bound `std::rc::Rc<std::cell::RefCell<S>>: std::borrow::Borrow<S>` is not satisfied
  --> <anon>:13:21
   |
13 |     let sb: &S = &s.borrow();
   |                     ^^^^^^ the trait `std::borrow::Borrow<S>` is not implemented for `std::rc::Rc<std::cell::RefCell<S>>`
   |
   = help: the following implementations were found:
             <std::rc::Rc<T> as std::borrow::Borrow<T>>
```

The problem is that the method call `s.borrow()` is applied to `Rc` which is an instance of `Borrow` rather than to the contained `RefCell` as intended (and as working in the example above), and the error just complains that this borrow is not possible (which is fine).

This is mentioned by @spirali in related #41865, but this issue deals with a different part of the problem. (Namely that if you remove the type annotation from `let sb : &S = ...`, the error message will complain about ambiguity of the `Borrow::borrow()` return type in a confusing way.)

I would propose to change the method name for `RefCell::borrow` to something else (a painful change, but leaving such bugs around things implementing the `Deref` trait might be even worse for the language long-term) and avoid this naming collisions whenever possible (is there a guideline for that?). Any other solutions?
Repository: kubernetes
Issue: Refactor hollow-node into hollow-kubelet and hollow-proxy & make them config-driven
Labels: priority/backlog,kind/cleanup,sig/scalability,lifecycle/frozen

Currently it's a mess having the same file for both hollow- kubelet and proxy that morphs into one or the other based on a flag.
- This should be refactored into separate files for each.
- Define the right set of configs/flags for either and not take everything together.
- Move almost all logic in hollow-node.go to hollow-kubelet.go and hollow-proxy.go, so we have useful libraries for them.

cc @wojtek-t @gmarek
Repository: go
Issue: net: IPv6 lookup fails when IPv4 hosts entry is present
Labels: help wanted,NeedsFix

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?
```
go version go1.6 linux/amd64
```

### What operating system and processor architecture are you using (`go env`)?
```
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/luke/work"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
```

### What did you do?
Add a IPv4 entry to the host file for example.com (do not add an IPv6 entry):

```
$ grep example.com /etc/hosts
1.2.3.4 example.com
```

Run the following code:
```
package main

import (
    "fmt"
    "net"
)

func main() {
    fmt.Println(net.ResolveIPAddr("ip6", "example.com"))
}
```

### What did you expect to see?
When explicitly requesting an IPv6 address you should be returned an IPv6 if available via DNS even if there is an IPv4 address in the hosts file.

### What did you see instead?
No addresses were returned:

```
$ GODEBUG=netdns=go go run dns.go 
<nil> no suitable address found
```
```
$ GODEBUG=netdns=cgo go run dns.go 
<nil> no suitable address found
```

This is because the request is passed from ipsock without specifying the desired address family:
https://github.com/golang/go/blob/master/src/net/ipsock.go#L259

Then dnsclient_unix performs a lookup against hosts, it finds an entry (IPv4 in this case) then returns this:
https://github.com/golang/go/blob/master/src/net/dnsclient_unix.go#L491-L494

ipsock then filters the returned addresses and only returns the IPs of the requested family:
https://github.com/golang/go/blob/master/src/net/ipsock.go#L265-L272
Repository: flutter
Issue: Test for API stability
Labels: a: tests,framework,c: API break,P3,team-framework,triaged-framework

We should create a test that checks out the Gallery (or some other representative app that uses lots of our APIs, but this seems like the best we have today) for each past release, then tries to run its tests against the tip of tree.
Repository: bitcoin
Issue: Add "effective fee rate" in rpc's mempool entries
Labels: RPC/REST/ZMQ

For both `getrawmempool true` and `getmempoolentry` it should probably have a field `effectivefeerate`.

Where as "effective fee rate" is defined as what miners sort transactions by (when taking into consideration the whole CPFP stuff).

I need this field for when trying to create my own CPFP transactions, but it's quite difficult to calculate myself (especially as the mempool entries don't have a "dependants" field, so you need to dump the whole mempool, which currently takes me about ~26 seconds alone). 

--

This is useful for when trying to do something like CPFP as you want to know the pre-existing fee rate. The term I use in my code that deals with this is "transaction cluster" which might make a decent term. It could expose a "clusterSize" and "clusterFee"  so you can calculate the feerate (as well as know the total size of the cluster)
Repository: react-native
Issue: Click and hold to select text using a text component
Labels: Resolution: Locked

### Description

I want click-and-hold-to-select-text using a Text component and then i searched it and i found `selectable` property.It good works but it copy the entire text field.I want to selecting a subset of the text field for copying.Actually this question is asked on stackoverflow .Here is question on stackoverflow:http://stackoverflow.com/a/37119619/4596143

### Reproduction Steps and Sample Code

I try this code block:
```
<Text
                        selectable={true}
                        style={styles.messageBody}>
                        {"text description"}
</Text>
```
This full of text ("text description") can copy not partially .I want to it like screenshot

**Actual behaviour:**
![image](https://cloud.githubusercontent.com/assets/5556159/25989281/277d68a6-3704-11e7-9b78-59b9590da818.png)

**Expected behavior:**

![image](https://cloud.githubusercontent.com/assets/5556159/25989290/2d178d46-3704-11e7-9415-9bf76e7d1b2a.png)



### Solution

They are said that RN 0.39 adds support to copy the entire text field, but does not yet include support for selecting a subset of the text field for copying on stackoverflow .I wonder `Text` component include support for selecting a subset of the text field for copying on new versions for react native.If the property does not exist on new versions ,will the property for text integrate ?

### Additional Information

- React Native version:^0.43
- Platform: IOS
- Development Operating System: macOS
Repository: rust
Issue: `:vis` matcher can't parse EOF
Labels: A-macros,T-lang,C-bug

# Observed behavior

The code below leads to parse error in `rustc 1.19.0-nightly (e40beb3af 2017-05-11)`.

```rust
#![feature(macro_vis_matcher)]
macro_rules! foo {
    ($v:vis) => {}
}
fn main() {
    foo!(); //~ ERROR unexpected end of macro invocation
    foo!(pub(in self));
}
```

# Expected behavior

`foo!()` is expanded correctly.
Repository: flutter
Issue: Refactor FormField into separate abstract and concrete classes
Labels: a: text input,c: new feature,framework,c: API break,c: proposal,P3,team-text-input,triaged-text-input

Right now `TextFormField` extends `FormField` and that's the only place in Flutter where a class extends a concrete subclass of `StatefulWidget`. We should take the parts of `FormField` that `TextFormField` uses and refactor them into an abstract subclass of `StatefulWidget` that they both extend.

/cc @xster @abarth
Repository: go
Issue: cmd/link: fails once more than one function of a .syso file is called
Labels: NeedsInvestigation,compiler/runtime

### What version of Go are you using (`go version`)?

`go version go1.8.1 linux/amd64`

### What operating system and processor architecture are you using (`go env`)?

```
GOARCH="arm64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/michael/go"
GORACE=""
GOROOT="/home/michael/go1.8.1"
GOTOOLDIR="/home/michael/go1.8.1/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build551212718=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="0"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
```

### What did you do?

```
$ head -50 multiple.go both_arm64.s both_arm64.S
==> multiple.go <==
package main

func asm1()

func asm2()

func main() {
	asm1()
	asm2()
}

==> both_arm64.s <==
TEXT ·asm1(SB),$0-0
	JMP asm1ext(SB)

TEXT ·asm2(SB),$0-0
	JMP asm2ext(SB)

==> both_arm64.S <==
.text

.global asm1ext
asm1ext:
    ret

.global asm2ext
asm2ext:
    ret
```

```
$ aarch64-linux-gnu-gcc -c -O0 -fPIC -no-pie -o both_arm64.syso both_arm64.S
$ GOARCH=arm64 go build
```

The issue is reproducible using `gcc` on an `arm64` machine to build the `.syso` file.

### What did you expect to see?

The program should build.

Removing either the call to `asm1` or `asm2` in the `.go` file makes it build.

Removing either the `JMP asm1ext(SB)` or the `JMP asm2ext(SB)` makes it build.

Adding `NOSPLIT` to both `asm1` and `asm2` doesn’t help either.

### What did you see instead?

```
$ GOARCH=arm64 go build
# multiple-syso
asm2ext: call to external function
```
Repository: vscode
Issue: Find in Files "files to include" override .gitignore
Labels: feature-request,search,upstream-issue-linked

VSCode 1.12: I have a TypeScript project with a `src` folder and a `.gitignore` file containing this:

```
/src/**/*.js
```

If I search for something, it is OK with 'files to include' is empty:

![image](https://cloud.githubusercontent.com/assets/101152/26018250/f378953e-376d-11e7-9e6d-cc61369f10cd.png)


but it is not OK if I scope the search:

![image](https://cloud.githubusercontent.com/assets/101152/26018286/2c8b59f6-376e-11e7-8a14-284fce7f5d61.png)

While I'm searching only in some sup-tree of my project, all .gitignore rules should still be taken into account.
Repository: rust
Issue: Incorrect suggestion in error when accessing field on raw pointer
Labels: A-diagnostics,T-compiler,C-bug

When compiling this code:
```rust
struct A {
    n: i32
}
struct B {
    n: i32
}

fn main() {
    let x = A{n:3};
    let a = &x as *const _;
    unsafe { println!("{}", (a as *const B).n); }
}
```
You get the following error message:
```
error: no field `n` on type `*const B`
  --> <anon>:11:45
   |
11 |     unsafe { println!("{}", (a as *const B).n); }
   |                                             ^
   |
   = note: `a as *const B` is a native pointer; perhaps you need to deref with `(*a as *const B).n`
```
The suggested deref `(*a as *const B)` doesn't work, what you need to write is `(*(a as *const B))`.