hello_world.c segfaults in the most weird way

37 views
Skip to first unread message

robertle

unread,
Sep 3, 2009, 1:19:52 PM9/3/09
to ebbebb
hi folks,

i amtrying to use libebb, but don't get very far: i compiled the
library ok (minus the -lefence), and then compiled the hello_world.c:

gcc -g -Wall -o hello hello_world.c -I.. ../libebb.a -lgnutls -lev

when i run this, it segfaults on ev_loop(). i linked against a debug
version of libev and libebb, and traced through the program, just to
find this weird behavior: the loop pointer gets corrupted when you do
ev_io_set in ebb_server_listen_on_fd. that doesn't make much sense to
me though, everything looks good.

has anyone seen this before?

thanks robert

robertle

unread,
Sep 4, 2009, 5:03:08 AM9/4/09
to ebbebb
found it: that happens when you compile the library with -
DHAVE_GNUTLS, and the app without it! then the structures have a
different size...

cu robert
Reply all
Reply to author
Forward
0 new messages