On Thu, 11 Aug 2011 14:55:29 +0300, bearophile <[email protected]> wrote:

If I'm writing a commercial, closed-source program meant for
redistribution, including any unnecessary information that helps reversers
to understand how the program works is just stupid.

Then you don't add a message to assert(0), so it keeps being translated with just an efficient HLT.

But I want a message in debug mode! Are you saying that your use case is so much more common than messages meant only for the debug development stage?

The purpose of D programs is varied, there are not just closed source programs to sell. The user of a small D program I have recently written was sitting in a room near mine. He has hit an assert, he has told me what the message is, and I have fixed the code and sent him the fixed binary. The program is now working, it seems.

I don't see what the problem is. Is your program buggy? Don't use -release. Are you done fixing bugs? Use -release to remove pointless clutter. Is the program segfaulting on a user's PC? Send him a debug build!

Failed asserts in release executables should never happen, unless your
program is buggy. If your program is buggy, don't use -release until
you've debugged it.

Sometimes I think it's not buggy, but it contains one or more bugs :-(

That's YOUR problem. :)

--
Best regards,
 Vladimir                            mailto:[email protected]

Reply via email to