View mode: basic / threaded / horizontal-split · Log in · Help
January 31, 2005
-debug phobos
It would be nice if a debug version of phobos gets used when -debug is  
specified. I just noticed a bug in the out contract of ifind(), which  
would have otherwise been undetected.. which makes me think, all those  
contracts aren't used.
January 31, 2005
Re: -debug phobos
Vathix wrote:

> It would be nice if a debug version of phobos gets used when -debug is  
> specified. I just noticed a bug in the out contract of ifind(), which  
> would have otherwise been undetected.. which makes me think, all those  
> contracts aren't used.

I found that Phobos dumps a lot of crap when -debug is used,
so I just took out the -release from DFLAGS for my debug lib.

/usr/lib/libphobos-debug.a

That still honors the contracts, even if they seem to throw
AssertError instead of the correct InException/OutException ?


You can find how I built it, in the RPM specfile:
http://www.algonet.se/~afb/d/dmd.spec
Which didn't work on FC3, for some reason ?

--anders
January 31, 2005
Re: -debug phobos
On Mon, 31 Jan 2005 07:18:46 -0500, Vathix <vathix@dprogramming.com> wrote:

> It would be nice if a debug version of phobos gets used when -debug is  
> specified. I just noticed a bug in the out contract of ifind(), which  
> would have otherwise been undetected.. which makes me think, all those  
> contracts aren't used.

Actually, it looks like a bug in the code
   ifind("</head>", "</html>")
returns 1.

See why phobos' contracts should be enabled for debug builds ;p
Top | Discussion index | About this forum | D home