Thread overview | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
July 15, 2011 [Issue 6329] New: Out of range exceptions not thrown in certain cases | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6329 Summary: Out of range exceptions not thrown in certain cases Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: andrej.mitrovich@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2011-07-15 16:43:59 PDT --- import std.stdio; import std.file; void main() { foreach (string entry; dirEntries(".", SpanMode.shallow)) { writeln(entry[0..1000]); // out of range } } DMD 2.053: D:\>dmd test.d && test.exe core.exception.RangeError@test(8): Range violation DMD 2.054: D:\>dmd test.d && test.exe D:\> Wheres the range error?? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 21, 2011 [Issue 6329] Out of range exceptions not thrown in certain cases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=6329 Vladimir Panteleev <thecybershadow@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |thecybershadow@gmail.com Resolution| |DUPLICATE --- Comment #1 from Vladimir Panteleev <thecybershadow@gmail.com> 2011-07-21 16:29:13 PDT --- As I posted on the newsgroup: It sounds like standard crash dialogs are disabled on your system (or the problem somehow manifests differently for you). But the cause is the same. *** This issue has been marked as a duplicate of issue 6308 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 08, 2011 [Issue 6329] Out of range exceptions not thrown in certain cases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=6329 --- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2011-09-08 09:18:00 PDT --- Created an attachment (id=1022) Error messages 2.055 still prints out excessive error messages. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 08, 2011 [Issue 6329] Out of range exceptions not thrown in certain cases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=6329 --- Comment #3 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2011-09-08 09:19:09 PDT --- (In reply to comment #2) > Created an attachment (id=1022) [details] > Error messages > > 2.055 still prints out excessive error messages. I'm sorry, not "still", this is new behavior. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 08, 2011 [Issue 6329] Out of range exceptions not thrown in certain cases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=6329 --- Comment #4 from Vladimir Panteleev <thecybershadow@gmail.com> 2011-09-08 09:23:06 PDT --- It doesn't happen on my machine. Have you updated DMD/Phobos/Druntime properly? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 08, 2011 [Issue 6329] Out of range exceptions not thrown in certain cases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=6329 Vladimir Panteleev <thecybershadow@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|DUPLICATE | --- Comment #5 from Vladimir Panteleev <thecybershadow@gmail.com> 2011-09-08 09:24:23 PDT --- Never mind, it only happens when you don't use -g. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 08, 2011 [Issue 6329] Out of range exceptions not thrown in certain cases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=6329 --- Comment #6 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2011-09-08 09:28:29 PDT --- Typically I install DMD fresh to make sure I didn't screw something up while updating. I can confirm adding -g removes the access violations. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 12, 2011 [Issue 6329] Out of range exceptions not thrown in certain cases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=6329 --- Comment #7 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2011-10-12 16:35:00 PDT --- Here's more issues, this time the sample tries to write to a file handle that was opened in read-only mode: import std.stdio; import std.file; void main() { foreach (string entry; dirEntries(".", SpanMode.shallow)) { auto file = File(entry, "r"); string[] lines; foreach (line; file.byLine) { lines ~= line.idup; } foreach (line; lines) { file.writeln("asdf"); } } } $ dmd test.d && test.exe Nothing is outputted. But with -g: $ dmd -g test.d && test.exe $ std.exception.ErrnoException@D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(1164): (No error) So without the symbolic info I get nothing in stdout. However If I change the sample to this: import std.stdio; import std.file; void main() { foreach (string entry; dirEntries(".", SpanMode.shallow)) { auto file = File(entry, "r"); file.writeln("asdf"); } } $ dmd test.d && test.exe object.Error: Access Violation .. and this error message will loop forever. But with -g I only get one error message as it should be: $ dmd -g test.d && test.exe $ std.exception.ErrnoException@D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(1164): (No error) So I'll just have to compile with -g all the time until this gets resolved. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 05, 2012 [Issue 6329] Out of range exceptions not thrown in certain cases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=6329 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@digitalmars.com Component|DMD |druntime --- Comment #8 from Walter Bright <bugzilla@digitalmars.com> 2012-02-05 00:18:07 PST --- This is a druntime issue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
March 04, 2012 [Issue 6329] Out of range exceptions not thrown in certain cases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=6329 --- Comment #9 from Walter Bright <bugzilla@digitalmars.com> 2012-03-03 20:21:31 PST --- (In reply to comment #0) > import std.stdio; > import std.file; > void main() > { > foreach (string entry; dirEntries(".", SpanMode.shallow)) > { > writeln(entry[0..1000]); // out of range > } > } > DMD 2.053: > D:\>dmd test.d && test.exe > core.exception.RangeError@test(8): Range violation > DMD 2.054: > D:\>dmd test.d && test.exe > D:\> > Wheres the range error?? The range error is 'entry' is a string, and you are slicing it beyond it's end. This is not a bug in the compiler or runtime, it's in your code. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation