In http://gcc.gnu.org/svn/gcc/trunk/libffi/README
/* Initialize the argument info vectors */ args[0] = &ffi_type_uint; should be /* Initialize the argument info vectors */ args[0] = &ffi_type_pointer; The code happens to work stand-alone, but when included in a large program on x86_64, you get a nasty segfault. -- Summary: libffi: bug in example program Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libffi AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: alexander dot belopolsky at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31491