+#include <errno.h>
+#include <stdint.h>
+static int ok()
+{
+ return 0;
+}
+static int bug()
+{
+ errno = 0;
+ return ((int(*)())(intptr_t)0)();
+}
+static int err()
+{
+ errno = EAGAIN;
+ return -1;
+}
+/**************************************************************************/
+/**************************************************************************/
+/*** BINDINGS V2 ***/
+/**************************************************************************/
+/**************************************************************************/
+#if defined(BUG1) /* incomplete exports: afbBindingV2data miss */
+
+#define AFB_BINDING_VERSION 0
+#include <afb/afb-binding.h>
+const struct afb_binding_v2 afbBindingV2;
+
+#endif
+/**************************************************************************/
+#if defined(BUG2) /* incomplete exports: afbBindingV2 miss */
+
+#define AFB_BINDING_VERSION 0
+#include <afb/afb-binding.h>
+struct afb_binding_data_v2 afbBindingV2data;
+
+#endif
+/**************************************************************************/
+#if defined(BUG3) /* zero filled structure */
+
+#define AFB_BINDING_VERSION 0
+#include <afb/afb-binding.h>
+const struct afb_binding_v2 afbBindingV2;
+struct afb_binding_data_v2 afbBindingV2data;
+
+#endif
+/**************************************************************************/
+#if defined(BUG4) /* no verb definition */
+
+#define AFB_BINDING_VERSION 2
+#include <afb/afb-binding.h>
+
+const struct afb_binding_v2 afbBindingV2 = {
+ .api = "bug4",
+ .preinit = (void*)ok,
+ .init = (void*)ok
+};
+#endif
+/**************************************************************************/
+#if defined(BUG5) /* preinit buggy */
+
+#define AFB_BINDING_VERSION 2
+#include <afb/afb-binding.h>
+
+struct afb_verb_v2 verbs[] = {
+ { NULL }
+};
+const struct afb_binding_v2 afbBindingV2 = {
+ .api = "bug5",
+ .verbs = verbs,
+ .preinit = (void*)bug,
+ .init = (void*)ok
+};
+#endif
+/**************************************************************************/
+#if defined(BUG6) /* buggy init */
+
+#define AFB_BINDING_VERSION 2
+#include <afb/afb-binding.h>
+
+struct afb_verb_v2 verbs[] = {
+ { NULL }
+};
+const struct afb_binding_v2 afbBindingV2 = {
+ .api = "bug6",
+ .verbs = verbs,
+ .preinit = (void*)ok,
+ .init = (void*)bug
+};
+#endif
+/**************************************************************************/
+#if defined(BUG7) /* error in preinit */
+
+#define AFB_BINDING_VERSION 2
+#include <afb/afb-binding.h>
+
+struct afb_verb_v2 verbs[] = {
+ { NULL }
+};
+const struct afb_binding_v2 afbBindingV2 = {
+ .api = "bug7",
+ .verbs = verbs,
+ .preinit = (void*)err,
+ .init = (void*)ok
+};
+#endif
+/**************************************************************************/
+#if defined(BUG8) /* error in init */
+
+#define AFB_BINDING_VERSION 2
+#include <afb/afb-binding.h>
+
+struct afb_verb_v2 verbs[] = {
+ { NULL }
+};
+const struct afb_binding_v2 afbBindingV2 = {
+ .api = "bug8",
+ .verbs = verbs,
+ .preinit = (void*)ok,
+ .init = (void*)err
+};
+#endif
+/**************************************************************************/
+#if defined(BUG9) /* no api name */
+
+#define AFB_BINDING_VERSION 2
+#include <afb/afb-binding.h>
+
+struct afb_verb_v2 verbs[] = {
+ { NULL }
+};
+const struct afb_binding_v2 afbBindingV2 = {
+ .verbs = verbs,
+ .preinit = (void*)ok,
+ .init = (void*)ok
+};
+#endif
+/**************************************************************************/
+#if defined(BUG10) /* bad api name */
+
+#define AFB_BINDING_VERSION 2
+#include <afb/afb-binding.h>
+
+struct afb_verb_v2 verbs[] = {
+ { NULL }
+};
+const struct afb_binding_v2 afbBindingV2 = {
+ .api = "bug 10",
+ .verbs = verbs,
+ .preinit = (void*)ok,
+ .init = (void*)err
+};
+#endif
+/**************************************************************************/
+/**************************************************************************/
+/*** BINDINGS V3 ***/
+/**************************************************************************/
+/**************************************************************************/
+#if defined(BUG11) /* make a SEGV */
+