[phobos] FreeBSD segfaults with std.parallelism
David Simcha
dsimcha at gmail.com
Fri Apr 29 07:08:03 PDT 2011
On Fri, Apr 29, 2011 at 9:41 AM, Steve Schveighoffer <schveiguy at yahoo.com>wrote:
> I'll mention that I just was debugging some stuff in Linux for
> dcollections, and the line numbers for the unit tests given by gdb were off
> by a couple of lines (I had the same feelings you are having, how is this
> possible). That was just inside the unit tests. In the actual code, the
> line numbers were correct. What's more, when I would step over lines in
> gdb, the program would jump *back* some lines when there was no loop in the
> code.
>
> I wouldn't trust that GDB is giving you accurate info.
>
> My recommendation -- try using writeln debugging if possible.
>
Thanks for the info. The problem with writeln is that, when dealing with
nondeterministic bugs-from-Hell, you don't want to change timings or have
screens and screens of stuff printed. Now that I think of it, though,
scope(failure) might be useful here. For example:
void fun() {
scope(failure) stderr.writeln("Failed in fun().");
// Do stuff.
}
Also, I'll try running the code in a main block instead of a unittest
block. If it works then it's a compiler bug w.r.t. unit tests.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20110429/00c5a3bd/attachment.html>
More information about the phobos
mailing list