Stack smashing
When I am linking the compiled library of firedns to my program a "stack smash" occurs on termination of my program. The exact message is: "*** stack smashing detected *** $(application_name)"
I got the issue fixed when I remove all CFLAGS from the Makefile and compile again. I am using gcc version 4.8.1 (from the repo) on Ubuntu 13.10 x64
do you know where this message comes from ? is it from glibc? it would be helpful to know which exact flag in CFLAGS causes it, btw. would be helpful if you could remove one after the other until you found the culprit.
The problem may be much deeper than I expect. I think it results from different C standards. You are using -std=c99 to compile your library. By default gcc uses -std=gnu99 (so I do), this in combination with -D_XOPEN_SOURCE flag possibly cause the issue :-/ I am really not sure ... All over, the compiler flag -DHAVE_IPV6 causes the stack smash
ok thanks. i understand the issue now: if you compile the lib with different options than your app, the struct layout is diffferent. you have to add -DHAVE_IPV6 as well when you compile your app. i'll look intoit in more detail and see if we can fix it completely