Skip to Content.
Sympa Menu

svadev - [svadev] Runtime calls and poolalloc failure

svadev AT lists.siebelschool.illinois.edu

Subject: Svadev mailing list

List archive

[svadev] Runtime calls and poolalloc failure


Chronological Thread 
  • From: Alex Miller <mille151 AT illinois.edu>
  • To: svadev AT cs.uiuc.edu
  • Subject: [svadev] Runtime calls and poolalloc failure
  • Date: Mon, 26 Mar 2012 01:15:18 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
  • List-id: <svadev.cs.uiuc.edu>

Hey all,

In trying to get baggy bounds checking working, I've gotten stuck in a couple places:

1. In bringing up the baggy bounds checking runtime library, I've had to add a few stubs for functions like `boundscheckui_debug` to BBRuntime. However, I can't seem to find where calls to these functions are actually being inserted into the program. Where should I be looking to figure out why they're being added in and what they're supposed to be doing?

2. When trying to run poolalloc over a very small testcase[1], I keep on getting a "Pool allocating 0 global nodes!"[2] error that I can't seem to hunt down/understand.

Any help would be appreciated.

Thanks,
Alex

[1]: blah.c
#include <stdlib.h>

void* allocate() {
  return malloc(8);
}

int main() {
  char *p = allocate();
  p[64] = 8; // blatantly beyond boundary
  free(p);
  return 0;
}

[2]: compile.sh
#!/bin/bash
../Debug+Asserts/bin/clang -g -fmemsafety -emit-llvm -c blah.c -o blah.bc  #my local copy of clang has been hacked to remove the implicit `-lsc_dbg_rt -lpoolalloc_bitmap`
../../../Debug+Asserts/bin/opt -load ../../poolalloc/Debug+Asserts/lib/LLVMDataStructure.so -load ../../poolalloc/Debug+Asserts/lib/poolalloc.so -poolalloc blah.bc > blah.opt.bc  # currently barfs
../Debug+Asserts/bin/clang -g -fmemsafety -L ../Debug+Asserts/lib/ -lsc_bb_rt -lgdtoa -lstdc++ blah.opt.bc -o blah  




Archive powered by MHonArc 2.6.16.

Top of Page