All pastes #337809 Raw Edit

Someone

public text v1 · immutable
·published 2007-02-03 00:04 UTC
rendered paste body
#include <stdio.h>
#include "net-snmp/net-snmp-config.h"
#include "net-snmp/net-snmp-includes.h"
#include "net-snmp/library/snmp_logging.h"

// gcc -Wall -I. `net-snmp-config --cflags`   -c -o test.o test.c
// gcc -Wall -o test test.o `net-snmp-config --libdir` -lnetsnmp `net-snmp-config --external-libs`

int
main(void) {
  printf("Crash Test starts!\n");
  init_snmp("test");
  snmp_log(3,"netsnmp_assert %s failed %s:%d %s()\n",
             "__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (rowreq_ctx->data.ifentry->name) && __builtin_constant_p (ifentry->name) && (__s1_len = strlen (rowreq_ctx->data.ifentry->name), __s2_len = strlen (ifentry->name), (!((size_t)(const void *)((rowreq_ctx->data.ifentry->name) + 1) - (size_t)(const void *)(rowreq_ctx->data.ifentry->name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((ifentry->name) + 1) - (size_t)(const void *)(ifentry->name) == 1) || __s2_len >= 4)) ? __builtin_strcmp (rowreq_ctx->data.ifentry->name, ifentry->name) : (__builtin_constant_p (rowreq_ctx->data.ifentry->name) && ((size_t)(const void *)((rowreq_ctx->data.ifentry->name) + 1) - (size_t)(const void *)(rowreq_ctx->data.ifentry->name) == 1) && (__s1_len = strlen (rowreq_ctx->data.ifentry->name), __s1_len < 4) ? (__builtin_constant_p (ifentry->name) && ((size_t)(const void *)((ifentry->name) + 1) - (size_t)(const void *)(ifentry->name) == 1) ? __builtin_strcmp (rowreq_ctx->data.ifentry->name, ifentry->name) : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (ifentry->name); register int __result = (((__const unsigned char *) (__const char *) (rowreq_ctx->data.ifentry->name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (rowreq_ctx->data.ifentry->name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) {__result = (((__const unsigned char *) (__const char *) (rowreq_ctx->data.ifentry->name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (rowreq_ctx->data.ifentry->name))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (ifentry->name) && ((size_t)(const void *)((ifentry->name) + 1) - (size_t)(const void *)(ifentry->name) == 1) && (__s2_len = strlen (ifentry->name), __s2_len < 4) ? (__builtin_constant_p (rowreq_ctx->data.ifentry->name) && ((size_t)(const void *)((rowreq_ctx->data.ifentry->name) + 1) - (size_t)(const void *)(rowreq_ctx->data.ifentry->name) == 1) ? __builtin_strcmp (rowreq_ctx->data.ifentry->name, ifentry->name) : (__extension__({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (rowreq_ctx->data.ifentry->name); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (ifentry->name))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (ifentry->name))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (ifentry->name))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *)(ifentry->name))[3]); } } __result; }))) : __builtin_strcmp (rowreq_ctx->data.ifentry->name, ifentry->name)))); }) == 0",
             "if-mib/ifTable/ifTable_data_access.c",
             201,
             __FUNCTION__); 
  exit(0);
}