| |
 |
|
|
Linux Forum Index » Linux Development - Applications » segmentation fault in opening brace...
Page 1 of 1
|
| Author |
Message |
| Ittay Dror... |
Posted: Sat Aug 09, 2008 5:51 pm |
|
|
|
Guest
|
Hi,
I'm using Buildr, a build tool based on Ruby. I have compiled the Ruby
implementation on my computer which is Ubuntu 8.04.
I'm getting SIGSEGV, when running the program. Looking at the source
code the fault happens at a line that contains only an opening curly
brace for a function. There are 703 function calls in the stack, but
the stack size is unlimited (ulimit -s)
What is the cause of this fault (assuming that faulting on a curly
brace is some phenomena that is not related directly to bugs in the
code)? Is there a work around?
Thank you,
Ittay |
|
|
| Back to top |
|
| Paul Pluzhnikov... |
Posted: Sun Aug 10, 2008 1:06 am |
|
|
|
Guest
|
Ittay Dror <ittay.dror at (no spam) gmail.com> writes:
Quote: I'm using Buildr, a build tool based on Ruby. I have compiled the Ruby
implementation on my computer which is Ubuntu 8.04.
I'm getting SIGSEGV, when running the program. Looking at the source
code the fault happens at a line that contains only an opening curly
brace for a function. There are 703 function calls in the stack, but
the stack size is unlimited (ulimit -s)
Is the crash happening in the main thread, or in some other thread?
There is no such thing as unlimited stack size for threads other
than main, and it's possible to run out of stack even in the
main thread.
703-deep recursion sounds excessive. Is it infinite?
You can tell whether you ran out of stack with gdb 'x/20x $esp'
command. If gdb says "unable to access memory at (no spam) ...", then you have.
If stack is accessible, what is the output from 'x/10i $pc-15' and
'info reg'?
Quote: What is the cause of this fault
You have the program crashing under debugger control; we don't.
You tell us.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email. |
|
|
| Back to top |
|
| |
|
Page 1 of 1
All times are GMT - 5 Hours
The time now is Sat Nov 22, 2008 11:30 am
|
|