unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Use of assert without NDEBUG
@ 2017-10-24 15:58 Jeffrey Walton
  0 siblings, 0 replies; only message in thread
From: Jeffrey Walton @ 2017-10-24 15:58 UTC (permalink / raw)
  To: guile-devel

Auditing Guile reveals it is using asserts and lacks NDEBUG by default:

$ grep -IR assert | grep '\.c'
...
libguile/struct.c:#include <assert.h>
libguile/struct.c:  assert (len % 2 == 0);
libguile/weak-set.c:#include <assert.h>
libguile/weak-set.c:  assert (set->n_items < size);
libguile/vports.c:#include <assert.h>
libguile/vports.c:      assert (len > 0 && len <= ENCODE_BUF_SIZE);
libguile/numbers.c:#include <assert.h>
libguile/numbers.c:    assert (0);
libguile/numbers.c:    assert (0);
libguile/numbers.c:    assert (0);
libguile/numbers.c:  assert (0);

Production software needs to run with NDEBUG to remove the debugging
and diagnostics. If assert() fires then abort() is called, which
results in a core dump. On some platforms, like Apple, Ubuntu and
Windows, the program's data gets sent to an external error reporting
service. Effectively the platform egresses all the program's sensitive
data.

Please don't use assert's in production software.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-24 15:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24 15:58 Use of assert without NDEBUG Jeffrey Walton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).