Skip to content

Instantly share code, notes, and snippets.

@daniel-j-h
Created August 24, 2012 02:53
Show Gist options
  • Save daniel-j-h/3444985 to your computer and use it in GitHub Desktop.
Save daniel-j-h/3444985 to your computer and use it in GitHub Desktop.
counting_bloom_add segfaults
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "dablooms.h"
int main() {
counting_bloom_t* bloom = NULL;
bloom = new_counting_bloom(1000, 0.05, "bloom.bin");
if(bloom == NULL) {
fprintf(stderr, "bloom init error\n");
exit(EXIT_FAILURE);
}
const char* item = "test";
// XXX
counting_bloom_add(bloom, item, strlen(item));
free_counting_bloom(bloom);
return EXIT_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment