Displaying 2 results from an estimated 2 matches for "freeptr".
2017 Feb 04
2
Wrong relocation emitted when building shared libraries with Control Flow Integrity
...' which may overflow at runtime; recompile with -fPIC
Recompiling with -fPIC does not actually help. I've managed to create a minimal reproducible testcase. Full command line and code to reproduce are below.
--- hello.c ---
#include <stdio.h>
#include <stdlib.h>
typedef void(*freeptr)(void*);
int getval(freeptr fp) {
void *m = malloc(sizeof(int));
if(m) {
fp(m);
}
return 42;
}
int export() {
printf("Test: %d\n", getval(free));
return 0;
}
---
--- command line ---
clang-3.9 -shared -fuse-ld=gold -flto -fsanitize=cfi-icall -fPIC -o li...
2009 Dec 29
0
aMSN segfaults at login after configuring my home network
...imized out>
#13 0xb7e395a9 in TclObjInterpProcCore (interp=0x80563a0,
procNameObj=0x908fd48, skip=1, errorProc=0xb7e39e30 <MakeProcError>)
at /build/buildd/tcl8.5-8.5.7/unix/../generic/tclProc.c:1748
codePtr = 0x9157e88
procPtr = 0x876bf88
result = 1
freePtr = <value optimized out>
#14 0xb7e39487 in TclObjInterpProc (clientData=0x876bf88, interp=0x80563a0,
objc=6, objv=0x81b7d58)
at /build/buildd/tcl8.5-8.5.7/unix/../generic/tclProc.c:1642
result = 0
#15 0xb7da6b59 in TclEvalObjvInternal (interp=0x80563a0, objc=6,
objv=0x81b7d...