[Xcb] How sane would be to build with -DNDEBUG?

Diego 'Flameeyes' Pettenò flameeyes at gmail.com
Fri Mar 23 19:03:17 PDT 2007


Hi there,
Although I left Gentoo some time ago, I'm still looking at xcb from
both an user and a packager point of view (I wasn't xcb maintainer of
course, Donnie does a heck of a better job than I ever did with my
packages), and now I was wondering... how much sane would it be to have
a non-debug build of libxcb building with NDEBUG defined?

Let me explain why I ask: xine-lib will soon be released with xcb
support for the new Kaffeine version, thanks to Christoph&Christophe,
so it's likely that at least for Gentoo more users will be building
libX11 with xcb support (xlib-xcb), and I do expect a few of them to
report (again, and again, yes I have little faith in users to do the
right thing, that is to search for duplicate bugs) the failures with
Java graphical applications.

Now, as the problem is caused by the lock assert, I was wondering if it
would make any sense to make the non-debug default build of libxcb pass
-DNDEBUG in the C flags, so that assert() calls would just be skipped
over. This works fine for other libraries (alsa-lib does it this way
for instance), but as it usually depends on a per-library basis, I'd
rather ask here before proposing this to Donnie (and he can read it
here most likely, so ... :) ).

The main problem usually is with assertions on condition that are
actually assumed during the rest of the code, like that a pointer is
absolutely not NULL. On some cases if the assertion is wrong, when it's
disabled, the function in question returns error and it's handled
gracefully, but I'm not sure if it's the case here or not.

-- 
Diego "Flameeyes" Pettenò
http://farragut.flameeyes.is-a-geek.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xcb/attachments/20070324/3f0dd51f/signature.pgp


More information about the Xcb mailing list