473,396 Members | 1,970 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

stack overflow exception

Hi,
My C-code is working properly in Cygwin.
But when I run the same code in VC++ or LCC,
I use to get stack overflow exception during run time.
It is not entring into my function from testbench.
My function consists of two inputs of each 8192 size of array.
And output too same.

Can any body give some suggestion.
Is it compiler problem or my code problem.

Oct 16 '06 #1
5 2814
sa*******@gmail.com wrote:
Hi,
My C-code is working properly in Cygwin.
But when I run the same code in VC++ or LCC,
I use to get stack overflow exception during run time.
It is not entring into my function from testbench.
My function consists of two inputs of each 8192 size of array.
And output too same.

Can any body give some suggestion.
Is it compiler problem or my code problem.
I think the group's psychics are on holiday, so you'd better show the
code for the benefit of the rest of us.

--
Ian Collins.
Oct 16 '06 #2
In article <11**********************@k70g2000cwa.googlegroups .com>,
<sa*******@gmail.comwrote:
My C-code is working properly in Cygwin.
But when I run the same code in VC++ or LCC,
I use to get stack overflow exception during run time.
It is not entring into my function from testbench.
My function consists of two inputs of each 8192 size of array.
And output too same.
If you have local variables of that size, then your arrays might
be larger than are permitted for local variables by that compiler.
You might need other compiler options, or you might need to rewrite
the code to use malloc().
--
Programming is what happens while you're busy making other plans.
Oct 16 '06 #3
Hi,
Thank you very much.
I have modified my code to use malloc for my local variables
and the problem is solved.
Walter Roberson wrote:
In article <11**********************@k70g2000cwa.googlegroups .com>,
<sa*******@gmail.comwrote:
My C-code is working properly in Cygwin.
But when I run the same code in VC++ or LCC,
I use to get stack overflow exception during run time.
It is not entring into my function from testbench.
My function consists of two inputs of each 8192 size of array.
And output too same.

If you have local variables of that size, then your arrays might
be larger than are permitted for local variables by that compiler.
You might need other compiler options, or you might need to rewrite
the code to use malloc().
--
Programming is what happens while you're busy making other plans.
Oct 16 '06 #4
sa*******@gmail.com wrote:
Walter Roberson wrote:
In article <11**********************@k70g2000cwa.googlegroups .com>,
<sa*******@gmail.comwrote:
My C-code is working properly in Cygwin.
>But when I run the same code in VC++ or LCC,
>I use to get stack overflow exception during run time.
>It is not entring into my function from testbench.
>My function consists of two inputs of each 8192 size of array.
>And output too same.
If you have local variables of that size, then your arrays might
be larger than are permitted for local variables by that compiler.
You might need other compiler options, or you might need to rewrite
the code to use malloc().

Hi,
Thank you very much.
I have modified my code to use malloc for my local variables
and the problem is solved.
And now, please read the information at the following URLs:

<http://www.safalra.com/special/googlegroupsreply/>
<http://clc-wiki.net/wiki/Introduction_to_comp.lang.c>
<http://en.wikipedia.org/wiki/USENET>

Oct 16 '06 #5
Groovy hepcat sa*******@gmail.com was jivin' on 15 Oct 2006 23:56:41
-0700 in comp.lang.c.
stack overflow exception's a cool scene! Dig it!
My C-code is working properly in Cygwin.
What code?
>But when I run the same code in VC++ or LCC,
I use to get stack overflow exception during run time.
What code?
>It is not entring into my function from testbench.
What? The above line makes no sense.
>My function consists of two inputs of each 8192 size of array.
What function?
>And output too same.
Output of what?
>Can any body give some suggestion.
Yes. Fix the code. If you are having trouble doing so, post the code
(cut down to the smallest *complete* program that displays the
problem, if the whole thing is too big to post), with a concise
explanation of what it is meant to do and how it is supposed to work,
as well as a concise but reasonably detailed description of the
problem.
>Is it compiler problem or my code problem.
Silly question! (I assume it's meant to be a question. Though it
doesn't end in a question mark.)

--

Dig the even newer still, yet more improved, sig!

http://alphalink.com.au/~phaywood/
"Ain't I'm a dog?" - Ronny Self, Ain't I'm a Dog, written by G. Sherry & W. Walker.
I know it's not "technically correct" English; but since when was rock & roll "technically correct"?
Oct 19 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Aguilar, James | last post by:
Hello all, To begin, yes, this -is- a homework assignment. However, it is for my Algorithms class, and my instructor has given us explicit permission to use "expert" groups like newsgroups, so...
13
by: Will Pittenger | last post by:
I have a Control derived class. When the parent of the control changes the control's Location property, the stack overflows. I have not found a way to find out what was on the stack when it does...
7
by: Gorge Bush | last post by:
Hi there, all was going well with my first C# project until now as I am getting a Stack Overflow exception. I haven't seen one of those since DOS programming days and back then all you did was up...
2
by: David W. Walker | last post by:
I am attempting to port a C code that runs OK on a number of Linux and Unix machines to Windows XP using Visual Studio C++. I have set the program up as a console application, but when I try to run...
1
by: Lee Greco | last post by:
A third party vendor has provided me a C++ .Net DLL, a .lib and all necessary ..h files, as well as a sample C++ .NET app that uses the DLL. The sample app needs the Stack Reserve Size set to...
0
by: Howard Kaikow | last post by:
I recently discovered http://msdn.microsoft.com/library/en-us/vclib/html/vclrf_resetstkoflw.asp, which states: "The _resetstkoflw function recovers from a stack overflow condition, enabling a...
2
by: duncan.welch | last post by:
I have some code that's been running happily for nearly a year. In my last compile and upload, it's stopped working properly. I have a strongly-typed dataset that returns ~12 datatables, and an...
2
by: Ali | last post by:
Hi, I got stack overflow errors while using an unmanaged dll from managed c# application. When i use editbin.exe to increase stack size of app , it works. Is there a way to increase stack size of...
4
by: =?Utf-8?B?cmFuZHkxMjAw?= | last post by:
Visual Studio 2005, C# WinForms application: Here’s the question: How can I increase the standard 1 MB stack size of the UI thread in a C# WinForms application? Here’s why I ask: I’ve...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.