Stack overflow in function ...

J

Jim Lambert

Hi All,

I recently started using syslog to record system messages and statuses. I
have been programming in C for years and always used my own system logging
(business requirement). Now that I am using syslog for this new product,
I'm getting these stack overflow messages in the message log file. Does
anyone have any idea why these stack overflow messages are happening? It
doesn't seem to be killing my program when it does it.

Any help would be appreciated.

Jim
 
J

Jim Lambert

Jim said:
Hi All,

I recently started using syslog to record system messages and
statuses. I have been programming in C for years and always used my
own system logging (business requirement). Now that I am using
syslog for this new product, I'm getting these stack overflow
messages in the message log file. Does anyone have any idea why
these stack overflow messages are happening? It doesn't seem to be
killing my program when it does it.

Any help would be appreciated.

Jim

BTW, this is on an OpenBSD 3.3 system.

Jim
 
J

Joona I Palaste

Anyone know of a newsgroup with people who will help me with a C problem I
am having instead of being pedantic asses?

What makes you think you have a C problem? Your problem seems to be with
FreeBSD. Programming languages and operating systems are different
things.
And if you think Christopher was a pedantic ass, you haven't seen
anything yet, believe me.
 
J

Joona I Palaste

What makes you think you have a C problem? Your problem seems to be with
FreeBSD. Programming languages and operating systems are different
things.
And if you think Christopher was a pedantic ass, you haven't seen
anything yet, believe me.

Sorry, I meant OpenBSD, not FreeBSD.
 
J

Jim Lambert

Joona said:
Sorry, I meant OpenBSD, not FreeBSD.

I understand about off-topic posts and do know that they are sometimes a
problem. What I have a problem with is people like Benson who can't wait
for some poor schmuck to show up with an off-topic post so they can
"correct" that person. Why not just ignore the message? Isn't the point of
not having off-topic posts to keep the post count down? So why add
yet-another-off-topic-post about an off-topic post?

He posted one response post to my post. It would have been just as easy for
him to answer the question or send me to a newsgroup he thought might answer
the question. Instead he was an ass. It wouldn't have increased the post
count at all and his ranting was probably a longer message than the answer
would have been.

I had a problem and after trying to resolve it and searching google, I
decided to post on the one newsgroup that I thought would be most helpful in
solving the problem. Heck it IS a C program I am having problems with.

Jim
 
J

Joona I Palaste

I understand about off-topic posts and do know that they are sometimes a
problem. What I have a problem with is people like Benson who can't wait
for some poor schmuck to show up with an off-topic post so they can
"correct" that person. Why not just ignore the message? Isn't the point of
not having off-topic posts to keep the post count down? So why add
yet-another-off-topic-post about an off-topic post?
He posted one response post to my post. It would have been just as easy for
him to answer the question or send me to a newsgroup he thought might answer
the question. Instead he was an ass. It wouldn't have increased the post
count at all and his ranting was probably a longer message than the answer
would have been.

Please point out exactly *where* Christopher was being an ass. All I
can see is him politely telling you you are off-topic and where to find
posting guidelines. Believe it or not, posting guidelines are not
personal insults.
 
J

Jim Lambert

Joona said:
Please point out exactly *where* Christopher was being an ass. All I
can see is him politely telling you you are off-topic and where to
find posting guidelines. Believe it or not, posting guidelines are not
personal insults.

LOL. I've been corrected. I guess he was just trying to be a nice guy and
help me out.

Anyway, sorry for the bandwidth use. This will be my last post on this
subject.

Regards,

Jim
 
C

CBFalconer

Jim said:
I recently started using syslog to record system messages and
statuses. I have been programming in C for years and always used
my own system logging (business requirement). Now that I am
using syslog for this new product, I'm getting these stack
overflow messages in the message log file. Does anyone have any
idea why these stack overflow messages are happening? It doesn't
seem to be killing my program when it does it.

I don't know the answer, but one possibility occurs to me. Your
system inherently assigns a small and economical stack, and
expands it whenever it overflows. The log messages clue you in to
this occurence. Maybe you want to look more closely at local
variables in some functions that are getting called recursively.

Did you get (and never examine or enable) the same messages in the
syslog file for earlier applications?
 
C

CBFalconer

Jim said:
.... snip ...

I had a problem and after trying to resolve it and searching
google, I decided to post on the one newsgroup that I thought
would be most helpful in solving the problem. Heck it IS a C
program I am having problems with.

I mistakenly and absent mindedly made a suggestion earlier, which
I now regret in the light of your excessive protests against being
redirected. Had you taken the trouble to lurk, read the welcome
message and the faq, you would have found a suitable elsewhere
with zero traffic.
 
J

Jim Lambert

CBFalconer said:
I don't know the answer, but one possibility occurs to me. Your
system inherently assigns a small and economical stack, and
expands it whenever it overflows. The log messages clue you in to
this occurence. Maybe you want to look more closely at local
variables in some functions that are getting called recursively.

Did you get (and never examine or enable) the same messages in the
syslog file for earlier applications?

Thank you, thank you! I appreciate it. I had defined a variable too many
times and I was overflowing the stack.

Thanks again,

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top