digitalmars.D.learn - one of the weirdest bugs ever - request for testing
- captaindet (26/26) Jun 12 2014 hi,
- Andrew Edwards (3/16) Jun 12 2014 I'm running OSX Mavericks with DMD v2.065.0. This behavior cannot be
- Philippe Sigaud via Digitalmars-d-learn (3/12) Jun 12 2014 Linux, 64bits, DMD v2.065.0
- captaindet (5/8) Jun 12 2014 thanks andrew, philippe,
- Rene Zwanenburg (2/13) Jun 12 2014 No problems with 2.065 on win, both 32 and 64 bit.
- captaindet (6/21) Jun 12 2014 great, thanks,
hi, i just run into a (wrong code gen?) bug that manifests itself only under certain conditions. before i file it, i'd like to know if it is still around in the latest DMD version and/or if other platforms and 64bit code is affected as well. bug description: std.algorithm.countUntil fails to find the needle my system: DMD 2.0642 compiling into 32bit code on Win7 64bit required conditions: compile with -release -inline -noboundscheck (an additional -O will also cause the bug) AND the module imports std.file /det ---- import std.stdio; import std.algorithm; import std.file; // not needed, but if imported, causing trouble, see below void main() { auto names = ["one","FOO","two","three"]; // wrong code gen(*) with -release -O -inline -noboundscheck or // with -release -inline -noboundscheck but only if std.file is imported: auto x = countUntil( names, "FOO" ); write(x); if( 0 <= x ) writeln(" found a FOO"); // (*) not found! }
Jun 12 2014
On 6/12/14, 3:20 PM, captaindet wrote:import std.stdio; import std.algorithm; import std.file; // not needed, but if imported, causing trouble, see below void main() { auto names = ["one","FOO","two","three"]; // wrong code gen(*) with -release -O -inline -noboundscheck or // with -release -inline -noboundscheck but only if std.file is imported: auto x = countUntil( names, "FOO" ); write(x); if( 0 <= x ) writeln(" found a FOO"); // (*) not found! }I'm running OSX Mavericks with DMD v2.065.0. This behavior cannot be reproduced.
Jun 12 2014
Linux, 64bits, DMD v2.065.0 Works OK for me ("1 found a FOO"), with or without importing std.file and compiling with -release -inline -noboundscheck// wrong code gen(*) with -release -O -inline -noboundscheck or // with -release -inline -noboundscheck but only if std.file is imported: auto x = countUntil( names, "FOO" ); write(x); if( 0 <= x ) writeln(" found a FOO"); // (*) not found! }I'm running OSX Mavericks with DMD v2.065.0. This behavior cannot be reproduced.
Jun 12 2014
On 2014-06-12 14:20, captaindet wrote:before i file it, i'd like to know if it is still around in the latest DMD version and/or if other platforms and 64bit code is affected as well.thanks andrew, philippe, i had the suspicion that it is a windows only problem anyway because the only thing that an unused std.file would do is pulling a lot of windows specific stuff (on my system). if now someone could test this with the current DMD on windows, 64 and 32 bit executables... /det
Jun 12 2014
On Thursday, 12 June 2014 at 22:14:23 UTC, captaindet wrote:On 2014-06-12 14:20, captaindet wrote:No problems with 2.065 on win, both 32 and 64 bit.before i file it, i'd like to know if it is still around in the latest DMD version and/or if other platforms and 64bit code is affected as well.thanks andrew, philippe, i had the suspicion that it is a windows only problem anyway because the only thing that an unused std.file would do is pulling a lot of windows specific stuff (on my system). if now someone could test this with the current DMD on windows, 64 and 32 bit executables... /det
Jun 12 2014
On 2014-06-12 17:27, Rene Zwanenburg wrote:On Thursday, 12 June 2014 at 22:14:23 UTC, captaindet wrote:great, thanks, so no need to file a bug report. some other bugfix seemed to have taken care of the issue alongside. (in the meantime i had the bug confirmed on another win7/64 machine, however, using DMD2.0642 again.) hopefully it is still fixed in 2.066 which will be my next upgrade step once it is out. /detOn 2014-06-12 14:20, captaindet wrote:No problems with 2.065 on win, both 32 and 64 bit.before i file it, i'd like to know if it is still around in the latest DMD version and/or if other platforms and 64bit code is affected as well.thanks andrew, philippe, i had the suspicion that it is a windows only problem anyway because the only thing that an unused std.file would do is pulling a lot of windows specific stuff (on my system). if now someone could test this with the current DMD on windows, 64 and 32 bit executables... /det
Jun 12 2014