HaxeFoundation / HaxeFoundation/haxe

[cpp] weird crash/corruption with Dynamic and Visual Studio 2015

Open
#5,567 7 comments 0 reactions 1 assignee Claimed by @hughsando View on GitHub
bug platform-cpp
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

The following crashes for me on Windows if compiled with VS2015 (aka version 19 aka version 14). @Simn couldn't reproduce it with the previous one (`Using MSVC version: 18`). Interestingly, if we replace those `"hello"` strings with empty strings (`""`) it doesn't crash, but prints some rubbish instead.

``` haxe
class Main {
static function f(v:Dynamic) {
f2("hello" + Std.string(v) + "hello");
}

@:pure(false) static function f2(v:String) {
trace(v);
}

static function main(){
f("s");
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.