sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: x/text/secure/bidirule: label starting with EN UTF8 property should be invalid
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
go version go1.9 darwin/amd64

### Does this issue reproduce with the latest release?
yes

### What operating system and processor architecture are you using (`go env`)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/mgalkowski/work/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.9/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.9/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/cs/93b4_xbx4l5gn1wx0f69p3d40000gn/T/go-build033566806=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
### What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
```
package main

import (
	"fmt"

	"golang.org/x/text/secure/bidirule"
)

func main() {
	var invalidLabel = "0aaaa"
	var invalidLabelEscaped = "\u0030aaaaa"

	fmt.Println(bidirule.ValidString(invalidLabel))
	fmt.Println(bidirule.ValidString(invalidLabelEscaped))
}
```

### What did you expect to see?
```
false
false
```
### What did you see instead?
```
true 
true
```

According to RFC 5893: 
```
The first character must be a character with Bidi property L, R,
       or AL.  If it has the R or AL property, it is an RTL label; if it
       has the L property, it is an LTR label.
```
0 (\u0030) have EN (european number) property, to it is not allowed at the beginning of the label. 
This package is not conformant with the BIDI RFC.
Repository: go
Issue: runtime: Reducing theoretical heap fragmentation
Labels: GarbageCollector

It is possible that after one or more GC cycles a span may contain only a single allocated object. After the program makes a phase change that size object may become unpopular and there is no need to allocate in that span again. This would be detectable after several GCs cycles as a span that has not been allocated in. It would be really nice if we could move that object and use that span for a different size class. That approach is often touted as an advantage of a moving collector. It is important to point out that this is merely a theoretical problem and currently there is no indication of it in the wild in an important application. Someday if it becomes a problem this issue offers a possible solution.

The perhaps novel idea is that we morph the span into a span with a larger size class according to the needs of the new phase. The single allocated object remains where it is but the garbage collector treats it as a larger sized object based on the span's new class size. There will be (new_size - old_size) fragmentation for that single object but that seems a small price to pay. The rest of the span would be used to allocate objects of the new popular size. Not only would this work for a single object but for any sparsely populated span where sparsely is determined by some TBD heuristic.

What if the original object straddled two of the new size class' objects? This could be easily avoided by selecting some other size class. But assuming we didn't want this restriction. If there is space both before and after the object in the new size class simply put a pointer in those free slots to the other part of the object and adjust the GC pointer map. The result would be that the GC would never free the object until both halves were no longer live.
Repository: flutter
Issue: `flutter devices` doesn't properly list emulator names
Labels: platform-android,tool,customer: crowd,P3,team-android,triaged-android

## Steps to Reproduce

1. Create and name some AVDs in the Android Virtual Device Manager
1. Run `flutter devices`

=> list shows the wrong names of the AVDs

![screen shot 2017-08-30 at 16 00 09](https://user-images.githubusercontent.com/13644170/29876173-525c2d16-8d9c-11e7-99db-514a8908ff9f.png)

```
mit-macbookpro2:battery mit$ flutter devices
2 connected devices:

Android SDK built for x86 64 • emulator-5554                        • android-x64 • Android 7.1.1 (API 25) (emulator)
iPhone 5s                    • 603DCE1D-B3A5-48CD-A309-1C45ED7AC3CF • ios         • iOS 10.3 (simulator)
```
Repository: pytorch
Issue: CUDA multinomial is limited to 2^24 categories
Labels: high priority,module: distributions,module: cuda,triaged,module: 64-bit,function request

As reported by @Moustapha6C. The following fails, because there are too many categories:

```python
x = torch.randn(9000 * 5000).cuda().abs()
out = torch.multinomial(x, 10, replacement=True)
```

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411 @ngimel @fritzo @neerajprad @alicanb @vishwakftw @nikitaved @vincentqb
Repository: TypeScript
Issue: Merging constants with namespaces
Labels: Suggestion,In Discussion

I wrote this in closed #13536 first, but thought it might get lost there, so filing a new issue.

Merging `const`s with namespaces really makes sense. For a real-world example, let's take a popular library: [TinyMCE](https://www.tinymce.com/), writing proper type definitions for which requires this feature. Namespaces are really convenient in this case because all the classes from the [API](https://www.tinymce.com/docs/api/) are attached to the `tinymce` namespace object or to its subnamespaces. In the API, there are normal classes like `tinymce.Editor` and so called 'static classes' like `tinymce.EditorManager` which are just a type (interface) plus an object value of this type attached to the namespace:
```ts
declare namespace tinymce {
  // normal class
  class Editor {
    show(): void;
    // ...
  }
  // "static class"
  interface EditorManager {
    activeEditor: Editor;
    // ...
  }
  const EditorManager: EditorManager;
  // ...
}
```
Nothing unusual so far, but there is a plot twist. The namespace object `tinymce` itself implements the `tinymce.EditorManager` interface. It could be easily and beautifully solved by merging a `const` with the namespace:
```ts
declare const tinymce: tinymce.EditorManager;
declare namespace tinymce {
  // ... see the previous snippet
}
```
But unfortunately this isn't allowed. The error message is: `Cannot redeclare block-scoped variable 'tinymce'.`
Repository: flutter
Issue: Add more information to the animation library's landing page
Labels: framework,a: animation,d: api docs,c: proposal,P3,team-framework,triaged-framework

There are widgets for building animations outside of the animation library, e.g., all the *Transition widgets in the Widget library. Can we link to them from the animation library's landing page: https://docs.flutter.io/flutter/animation/animation-library.html?

Ideally, it could be useful to draw a diagram linking key classes related to building animations, including those dealing with simulations.

@Hixie @Sfshaza
Repository: opencv
Issue: Documentation improvement plan
Labels: feature,category: documentation

i have a request and a suggestion about [Documentation improvement plan](https://github.com/opencv/opencv/wiki/Documentation-improvement-plan)

i already made some contributions related to documentation and i want to keep working on it. I want to work according a right plan so if some tasks that users can do are identified clearly i will choose a task and work on it. after completing a task choose another and so on.

my suggestion is gathering feedbacks from users in documentation pages

for example see [msdn.microsoft.com](https://msdn.microsoft.com/en-us/library/windows/desktop/ms632679(v=vs.85).aspx)
there is "Is this page helpful? Yes No"
Repository: go
Issue: go/types: doesn't understands constants defined in cgo code
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?

go version go1.9 linux/amd64

### Does this issue reproduce with the latest release?

Yes, fails with `git tip` as well.

### What operating system and processor architecture are you using (`go env`)?

```
GOARCH="amd64"

GOBIN=""

GOEXE=""

GOHOSTARCH="amd64"

GOHOSTOS="linux"

GOOS="linux"

GOPATH="/home/travis/gopath"

GORACE=""

GOROOT="/home/travis/.gimme/versions/go1.9.linux.amd64"

GOTOOLDIR="/home/travis/.gimme/versions/go1.9.linux.amd64/pkg/tool/linux_amd64"

GCCGO="gccgo"

CC="gcc"

GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build036482233=/tmp/go-build -gno-record-gcc-switches"

CXX="g++"

CGO_ENABLED="1"

CGO_CFLAGS="-g -O2"

CGO_CPPFLAGS=""

CGO_CXXFLAGS="-g -O2"

CGO_FFLAGS="-g -O2"

CGO_LDFLAGS="-g -O2"

PKG_CONFIG="pkg-config"
```
### What did you do?

100% reproducible. Travis link:

https://travis-ci.org/purpleidea/mgmt/jobs/270103895#L969

(errors are on the subsequent lines)

### What did you expect to see?

No failures or a clear reason about what's wrong.

### What did you see instead?

gotype fails where it didn't fail in golang 1.8
it would be great to report this as a false positive or to understand what changed between 1.8 and 1.9 that this is an issue.

Thanks!
James
Repository: vscode
Issue: Option to allow quickSuggestions inside words
Labels: feature-request,suggest,editor-core

quickSuggestions do not show up when typing in the middle of a word.
It would be great if that could be configured by the language (or even the user).

Languages with completion proposals that do not only insert but also replace the end of the symbol, can then enable this setting.
Repository: vue
Issue: Provide/inject for custom directives
Labels: feature request

### What problem does this feature solve?
If a user uses a custom directive in their app in multiple places they might need to configure the directive in two or more different ways depending on the area of the app in which the directive is being used. If this configuration is used in many instances in one of these areas, providing this configuration on every instance becomes redundant and cumbersome.

### What does the proposed API look like?
I think the provide/inject pattern would be a good solution to this. A user could add different configurations in the top level provider components and use the custom directive normally in their descendants.

```js
var Provider = {
  provide: {
    foo: 'bar'
  },
  // ...
}

var OtherProvider = {
  provide: {
    foo: 'baz'
  },
  // ...
}

Vue.directive('bar', {
  inject: ['foo'],
  bind (el, binding) {
    // binding.injections.foo or binding.foo 
  }
})
```

```html
<provider><div v-bar="something"></div></provider>
<other-provider><div v-bar="somethingElse"></div></other-provider>
```

I'm not confident on what the best place is for the actual injections to live in the directive hook arguments but there are some ideas in the code example above.

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: opencv
Issue: test_video: OCL_Video/PyrLKOpticalFlow.Mat sporadic failures
Labels: bug,category: video,category: ocl

Nightly Linux builds:
- [20170827](http://pullrequest.opencv.org/buildbot/builders/master-lin64/builds/10204)
- [20170828](http://pullrequest.opencv.org/buildbot/builders/master-lin64/builds/10205)
- [20170829](http://pullrequest.opencv.org/buildbot/builders/master-lin64/builds/10206)

[Precommit builds](http://pullrequest.opencv.org/buildbot/builders/precommit_opencl_linux?numbuilds=250)

Message:
```
[----------] 8 tests from OCL_Video/PyrLKOpticalFlow
[ RUN      ] OCL_Video/PyrLKOpticalFlow.Mat/0
[       OK ] OCL_Video/PyrLKOpticalFlow.Mat/0 (1173 ms)
[ RUN      ] OCL_Video/PyrLKOpticalFlow.Mat/1
[       OK ] OCL_Video/PyrLKOpticalFlow.Mat/1 (39 ms)
[ RUN      ] OCL_Video/PyrLKOpticalFlow.Mat/2
[       OK ] OCL_Video/PyrLKOpticalFlow.Mat/2 (37 ms)
[ RUN      ] OCL_Video/PyrLKOpticalFlow.Mat/3
*** longjmp causes uninitialized stack frame ***: /build/precommit_opencl_linux/build/bin/opencv_test_video terminated
```
Repository: opencv
Issue: DNN_TARGET_OPENCL produces wrong output on multiple forward passes
Labels: bug,category: dnn

##### System information (version)

- OpenCV => 3.3.0
- Operating System / Platform => <b>Windows 64 Bit</b>
- Compiler => Visual Studio 2015

##### Detailed description

When I have tested Halide backend for dnn module along with opencl dnn target I have got an issue. After the first forward pass through the network (when, as tutorial says, runtime compilation of Halide pipelines takes a place) all calculations results are "freeze". "Freze" in a sense that no matter what data you forward to the network, it produces same output again and again.  As same code without net.setPreferableTarget(cv::dnn::DNN_TARGET_OPENCL) works well the problem seems to be in Halide pipeline.   

##### Steps to reproduce
Tutorial [example](http://docs.opencv.org/trunk/de/d37/tutorial_dnn_halide.html) can be used to reproduce. Just add net.setPreferableTarget(cv::dnn::DNN_TARGET_OPENCL) and the second input image and pass it through the network after first image pass.
Repository: TypeScript
Issue: Problem with destructuring + default values in the implementation of an inherited signature
Labels: Bug

**TypeScript Version:**  2.4.2, 2.5.2, 2.6.0-dev.20170831

Suppose I have a library which exports the following code

```ts
export interface Vector {
  x: number
  y: number
}

export interface Foo {
  foo(vector?: Vector): void;
}

export class Bar implements Foo {
  foo({ x, y }: Vector = { x: 3, y: 19 }): void {
    // ...
  }
}
```

The generated `.d.ts` file will look like

```ts
export interface Vector { x: number; y: number }

export interface Foo {
    foo(vector?: Vector): void;
}
export declare class Bar implements Foo {
    foo({x, y}?: Vector): void;
}
```

Now if I try to use this library in downstream code it will complain,

```
9     foo({x, y}?: Vector): void;
           ~
example/lib/index.d.ts(9,10): error TS2459: Type 'Vector | undefined' has no property 'x' and no string index signature.

9     foo({x, y}?: Vector): void;
              ~
example/lib/index.d.ts(9,13): error TS2459: Type 'Vector | undefined' has no property 'y' and no string index signature.
```

What's interesting is that the problem only occurs when overriding a method in a parent type, so if the signature is just

```ts
export declare class Bar /* no longer extends Foo */ {
    foo({x, y}?: Vector): void;
}
```

then the consuming code is perfectly happy.
Repository: rust
Issue: Re-enable detection of unused library #![feature] directives
Labels: A-lints,P-medium,T-lang,T-compiler,C-bug

Currently the compiler will warn users about unused `#![feature]` directives if they're (a) a library feature and (b) not actually ever used. The compiler doesn't currently warn you about unused `#![feature]` directives tied to language features.

In the process of making the stability annotations more incremental-friendly (https://github.com/rust-lang/rust/issues/44137) this check in the compiler has proven to be very difficult to make incremental. Namely what's happening here is:

* There's a function, [`check_stability`](https://github.com/rust-lang/rust/blob/97b01abf3d222523d0db4f79c13ed45e7fef27e3/src/librustc/middle/stability.rs#L492), which is used to verify that an API can actually be used.
* In this function if the API in question is unstable *and* the feature is activated, then [this feature name is stored off in a side table](https://github.com/rust-lang/rust/blob/97b01abf3d222523d0db4f79c13ed45e7fef27e3/src/librustc/middle/stability.rs#L551).
* As we run through the compiler this side table gets bigger and bigger. Right now this table is mostly built up during typeck. (I don't know the precise reason as to why it's in typeck, personally)
* Finally near the end of compilation we go through this table and use it to warn about unused `#![feature]` directives.

This "put things in a table on the side" behavior isn't very incremental friently and isn't too easy to transition over to the query system. For now this specific warning seems like it probably isn't that important at Rust 1.20.0 (while it was probably very important at Rust 1.0.0). I'm going to comment this out for now so we're not going to get lints/warnings about unused library features.

This is a FIXME to track re-enabling this warning!
Repository: flutter
Issue: Move the microbenchmarks to release mode rather than profile mode
Labels: a: tests,team,framework,c: performance,dependency: dart,P3,team-framework,triaged-framework

cc @yjbanov 

Based on suggestion in https://github.com/dart-lang/sdk/issues/30521
Repository: TypeScript
Issue: exported definitions for mix-in lack proper return type for functions returning "this"
Labels: Bug

<!-- BUGS: Please use this template. -->
<!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->
<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->

**TypeScript Version:**  2.4.2

**Code**

*Module 1*
```
export function IdentityMixin<T extends Constructor<{}>>(Base : T) {
  return class extends Base {
    identity() {
      return this;
    }
  };
}

class Foo {}
class IdFoo extends IdentityMixin(Foo) {}

const id = new IdFoo();
const same = id.identity();
```
*Module 2*
```
import { IdentityMixin } from 'module1';

class Foo {}
class IdFoo extends IdentityMixin(Foo) {}

const id = new IdFoo();
const same = id.identity();
```

**Expected behavior:**
In Module 1 both `id` and `same` have type `IdFoo`.
In Module 2 both `id` and `same` have type `IdFoo`.

**Actual behavior:**
In Module 2 both `same` has type `any`.
Repository: rust
Issue: Global allocator symbols aren't dllexport on MSVC
Labels: A-linkage,T-compiler,O-windows-msvc,C-bug

But they need to be for the `dylib` crate type! (and only the `dylib` crate type). Not really a critical bug, but I'm tagging this with a FIXME in the code.
Repository: TypeScript
Issue: Cannot implement generic type guarding function
Labels: Bug

<!-- BUGS: Please use this template. -->
<!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->
<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->

**TypeScript Version:**  2.5.2

**Code**

```
interface ITypeChecker
{
    isOfType<T extends TBase, TBase>(obj: TBase): obj is T; 
}


class Checker implements ITypeChecker
{
    isOfType<T extends TBase, TBase>(obj: TBase): obj is T
    {
        return true;
    }

}
```


**Expected behavior:**
Class _Checker_ should be treated as a valid implementation (used to be in Ts-2.3).
**Actual behavior:**
Compiler complains:
    

- interface-not-properly-implemented    
(...)
   - **Type predicate 'value is TBase' is not assignable to 'value is T'**
     - **Type 'TBase' is not assignable to type 'T'**
Repository: angular
Issue: Dynamically created view force a parent view update
Labels: type: bug/fix,freq2: medium,area: core,core: change detection,P3

<!--
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
-->

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre>

## Current behavior
<!-- Describe how the issue manifests. -->
We have the follows markup: 
```HTML
<container-component>
    <inner-component></inner-component>
    ......
    <ng-template>
        <container-component>
            <inner-component></inner-component>
            ......
        </container-component>
    </ng-template>
</container-component>
```
We dynamically creating an embedded view from the template in `container-component`.
Unexpected recursive call occurrence in injected `ContentChildren` property setter when we creating an embedded view from the template. 

The issue happens when the count of the `inner-component` reach to 30 (can be less in other scenarios). Removing one of them from markup breaks the recursive calls. 

## Minimal reproduction of the problem with instructions
Plunker: https://plnkr.co/edit/fffU9ql03j7nmmj5lzPg?p=preview

## What is the motivation / use case for changing the behavior?
<!-- Describe the motivation or the concrete use case. -->
We are creating an embedded view using the template for rendering a widget content. This issue breaking this functionality.

## Environment

<pre><code>
Angular version: 4.3.6
<!-- Check whether this is still an issue in the most recent Angular version -->

Browser: I'm reproduced it in latest Chrome (desktop), Firefox, IE and Edge
</code></pre>
Repository: opencv
Issue: V4L2: 1280p@30fps not available by default any more
Labels: category: videoio(camera),future

after the merge of #9479, 1280p@30fps is no longer available by default.
One is now required to do:
```py
cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc(*"MJPG"))
```
to be able to select this mode.

Used camera Logitech C615.
`v4l2-ctl --list-formats-ext`:

```
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'YUYV'
	Name        : YUYV 4:2:2
(...)
		Size: Discrete 1280x720
			Interval: Discrete 0.100s (10.000 fps)
			Interval: Discrete 0.133s (7.500 fps)
			Interval: Discrete 0.200s (5.000 fps)
(...)
	Index       : 1
	Type        : Video Capture
	Pixel Format: 'MJPG' (compressed)
	Name        : Motion-JPEG
(...)
		Size: Discrete 1280x720
			Interval: Discrete 0.033s (30.000 fps)
			Interval: Discrete 0.042s (24.000 fps)
			Interval: Discrete 0.050s (20.000 fps)
			Interval: Discrete 0.067s (15.000 fps)
			Interval: Discrete 0.100s (10.000 fps)
			Interval: Discrete 0.133s (7.500 fps)
			Interval: Discrete 0.200s (5.000 fps)
```
Repository: go
Issue: runtime: improve "sweep increased allocation count" diagnostics
Labels: NeedsFix,compiler/runtime

The infamous "sweep increased allocation count" panic is not very informative. What it really means is that a free object was found to be live. It should say that, and it should say which object it is and dump its contents. Essentially, it can cheaply give half of the information that gccheckmark can. This half may even be enough to debug the problem from a core dump and a heap graph.

The comments around the panic should give additional context (not worth printing), like saying that common causes are bad liveness maps, past-the-end pointers, unsafe conversions from pointers to integers and back to pointers, and just plain wild pointers. The comments should suggest running with GODEBUG=gccheckmark=1 to find the source of bad pointer.

/cc @RLH @randall77