Open nadako opened 8 years ago
could be a hxcpp problem, but i'm not sure
btw, adding -debug
makes it work
I seem to be unable to reproduce this (same MVSC version - C/C++ Optimizing Compiler Version 19.00.23506
). Both Main.exe
and Main-debug.exe
output helloshello
when I run them.
You don't have any special or anything activated right? Latest Haxe (cbee676) and Hxcpp?
wow, that's really weird... i don't think i have anything special in my system, but i'll check again later today.
Do you have the exact same MSVC version? 19.00.23506
? Who knows, with how strange this is it might be a bug that was already fixed in my version.
It outputs the exact version as well, but a bit later (if you have HXCPP_VERBOSE
defined).
I could not reproduce it either, but the symptoms sound like I might be returning a reference to a local variable that has gone out of scope somewhere. Maybe with things are less optimized, this might not matter.
On Tue, Aug 30, 2016 at 5:52 PM, Gama11 notifications@github.com wrote:
Do you have the exact same MSVC version? 19.00.23506? Who knows, with how strange this is it might be a bug that was already fixed in my version.
It outputs that one as well, but a bit later (if you have HXCPP_VERBOSE defined).
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HaxeFoundation/haxe/issues/5567#issuecomment-243390142, or mute the thread https://github.com/notifications/unsubscribe-auth/ABlp1h7NsSwX6zQ51vzpK37RseOdnWTeks5qk_1LgaJpZM4Jvys4 .
There is not actually a lot of code going on here - just String operator+(String). https://github.com/HaxeFoundation/hxcpp/blob/master/src/String.cpp#L1083
You could try debgging in here with something like: printf("operator+ %s %s\n", s, inRHS.s);
The other thing is the cache, you can check with: haxelib run hxcpp cache list
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.