[Issue 9134] failed assert leads to Segmentation fault when iterating file lines
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 1 11:45:19 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9134
--- Comment #6 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-03-01 11:45:18 PST ---
(In reply to comment #5)
> (In reply to comment #4)
> > I cannot it reproduce with g(In reply to comment #2)
> > > I ran into this bug as well. Adding the -g compiler option does not fix the
> > > problem for me.
> >
> > Which environment do you use? I cannot reproduce it now with 2.062 on windows
> > and linux git head.
>
> DMD64 D Compiler v2.062 on Ubuntu 64 bit.
>
> assert (false); causes a segmentation fault. I believe the problem might be
> that this assert is in a function that is indirectly called by a function with
> the extern (C) calling convention. The problem is further complicated because I
> call this function from x86 assembler code I wrote myself. I'm guessing the
> stack unwinding mechanism has a heart attack when it gets to that point in the
> stack.
OK. I can successfully run following code (with assertion failure, of course):
import std.stdio;
void main()
{
auto file = File("testcase.d","r");
foreach (ulong i, string line; lines(file))
assert(false);
// Segmentation fault (core dumped)
file.close();
}
without any switches using githead. The fact that you are facing bug my be
because it is already fixed in head. Can you test master branch? If there are
no objections, I will close issue as WORKSFORME.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list