From: John <st...@un...> - 2004-04-16 23:04:34
|
On Fri, Apr 16, 2004 at 06:51:37PM -0400, Steve Kann wrote: > John wrote: > > >On Fri, Apr 16, 2004 at 12:23:04PM -0400, Steve Kann wrote: > > > > > >>John wrote: > >> > >>The code in question here is simply: > >>static struct iax_event *iax_net_read(void) > >>{ > >> char buf[65536]; > >> int res; > >> struct sockaddr_in sin; > >> int sinlen; > >> sinlen = sizeof(sin); > >> res = recvfrom(netfd, buf, sizeof(buf), 0, (struct sockaddr *) > >>&sin, &sinlen); > >> > >> > >>I have no idea why you would segfault when calling sizeof an automatic > >>variable. That should probably be a constant assignment by the compiler.. > >> > >>Maybe the segfault is actually somewhere else, and you can find it if > >>you compile without optimization.. > >> > >>-SteveK > >> > >> > > > >here is a copy of the build. > > > >http://mail.unixjunkie.com/iaxcomm.build.txt > > > > > > > Did you add the -W flags to your CFLAGS? Those aren't in there by default.. > > Anyway, there's lots of warnings, but they seem to be due to the DEBU(G > macro invention that Kram uses.. > > Try just compiling but not assembling the output, and then look at the > assembly.. > > Just replace -c with -S in the compile line, and call the output .s -- > > cc -Igsm/inc -Iportaudio/pa_common -Iportaudio/pablio -Iportmixer/px_common > -g -Wall -Wpointer-arith -Ilibiax2/src -DIAXC_IAX2 -DLIBIAX > -DSPEEX_PREPROCESS=1 -DSPEEX_EC=1 -DLINUX -S -o libiax2/src/iax.s > libiax2/src/iax.c > > > Then look for iax_net_read in there.. > > > Well i didn't know how much of that you wanted to see.. http://mail.unixjunkie.com/iax.s.gz |