[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: problem with GNU C



> On Tue, Jul 31, 2001 at 10:51:38AM +0600, Ilya Teterin wrote:
> > I write the program under GNU C. Has faced with a not clear problem. I
> > have two box: 486 16 mb RAM and PIII. On both it is installed debian
> > linux. On first my program (?in call of strlen()?) inside
dispatch_connect
> > function unexpectedly terminated, no error messages (such as
"segmentation
> > fault") are displayed. On the other box all works normal. In what a
> > problem - in the program, hardware or OS? The code of the program:

> The only thing I can think of (since you didn't indicate what the
> differences were between the two boxes) is the first argument you passed
to
> select(). I'm pretty sure you'll never have 31000 descriptors open and I'm
> not even sure if the default fd_set can hold that many, leading to your
> stack being trashed.

> Other things: you should use snprintf, not sprintf and setting the 100th
> byte to null is a waste of time.

Setting byte to null was debug code. After all, what about my problem? ;)
I see no difference between two boxes, except I wrote. Both installed from
one CD set (official debian 2.2), kernel were not recompiled. Of course,
there are some differences such as installed X, fetchmail and other
packages, but I beleive that it isn't actual difference.




Reply to: