www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Memory allocation failed

reply Jason House <jason.james.house gmail.com> writes:
Has anyone else gotten the "Memory allocation failed" exception in D2? I have
to dig deeper to concretely prove it's not my fault, but I do know I wrote my
app to avoid memory allocation and watching top showed about 20k of growth over
the ~10 minutes it takes to reproduce the bug.

I don't look forward to debugging this without gdb.  gdb support has been
broken in D2 for a while now :(
Feb 17 2009
parent reply BCS <ao pathlink.com> writes:
Reply to Jason,

 Has anyone else gotten the "Memory allocation failed" exception in D2?
 I have to dig deeper to concretely prove it's not my fault, but I do
 know I wrote my app to avoid memory allocation and watching top showed
 about 20k of growth over the ~10 minutes it takes to reproduce the
 bug.
 
 I don't look forward to debugging this without gdb.  gdb support has
 been broken in D2 for a while now :(
 
One guess (I think I ran across this once) is a single allocation of size<0 as that ends up being GBs
Feb 17 2009
parent reply Jason House <jason.james.house gmail.com> writes:
BCS wrote:

 Reply to Jason,
 
 Has anyone else gotten the "Memory allocation failed" exception in D2?
 I have to dig deeper to concretely prove it's not my fault, but I do
 know I wrote my app to avoid memory allocation and watching top showed
 about 20k of growth over the ~10 minutes it takes to reproduce the
 bug.
 
 I don't look forward to debugging this without gdb.  gdb support has
 been broken in D2 for a while now :(
 
One guess (I think I ran across this once) is a single allocation of size<0 as that ends up being GBs
Apparently, setting an array length to -1 will cause this issue. It's unfortunate to not have a stack trace in the error output, or a functional gdb to capture it! I really hope gdb compatiblity will be fixed :(
Feb 17 2009
parent reply Walter Bright <newshound1 digitalmars.com> writes:
Jason House wrote:
 Apparently, setting an array length to -1 will cause this issue.  It's 
 unfortunate to not have a stack trace in the error output, or a functional 
 gdb to capture it!  I really hope gdb compatiblity will be fixed :(
What's wrong with gdb?
Feb 18 2009
parent reply Jason House <jason.james.house gmail.com> writes:
Walter Bright Wrote:

 Jason House wrote:
 Apparently, setting an array length to -1 will cause this issue.  It's 
 unfortunate to not have a stack trace in the error output, or a functional 
 gdb to capture it!  I really hope gdb compatiblity will be fixed :(
What's wrong with gdb?
See my issue 2575 in bugzilla. I worked with a gdb developer to diagnose the issue immediately prior to submitting the bug report. IIRC, gdb can't determine where the code is because some kind of top level offset is missing. Reading my bug report should be more helpful than my memory.
Feb 18 2009
parent reply Walter Bright <newshound1 digitalmars.com> writes:
Jason House wrote:
 Walter Bright Wrote:
 
 Jason House wrote:
 Apparently, setting an array length to -1 will cause this issue.
 It's unfortunate to not have a stack trace in the error output,
 or a functional gdb to capture it!  I really hope gdb
 compatiblity will be fixed :(
What's wrong with gdb?
See my issue 2575 in bugzilla. I worked with a gdb developer to diagnose the issue immediately prior to submitting the bug report. IIRC, gdb can't determine where the code is because some kind of top level offset is missing. Reading my bug report should be more helpful than my memory.
thanks
Feb 20 2009
parent reply Jason House <jason.james.house gmail.com> writes:
Walter Bright wrote:

 Jason House wrote:
 Walter Bright Wrote:
 
 Jason House wrote:
 Apparently, setting an array length to -1 will cause this issue.
 It's unfortunate to not have a stack trace in the error output,
 or a functional gdb to capture it!  I really hope gdb
 compatiblity will be fixed :(
What's wrong with gdb?
See my issue 2575 in bugzilla. I worked with a gdb developer to diagnose the issue immediately prior to submitting the bug report. IIRC, gdb can't determine where the code is because some kind of top level offset is missing. Reading my bug report should be more helpful than my memory.
thanks
I see you did post questions to the bugzilla report, and I did provide a response with what details I could deduce without a gdb dev helping me. Do you have enough information to work through the issue? Given how I currently have a program currently behaves differently with or without the -release flag, I'm extra motivated to get gdb working...
Feb 22 2009
parent Walter Bright <newshound1 digitalmars.com> writes:
Jason House wrote:
 Walter Bright wrote:
 
 Jason House wrote:
 Walter Bright Wrote:

 Jason House wrote:
 Apparently, setting an array length to -1 will cause this issue.
 It's unfortunate to not have a stack trace in the error output,
 or a functional gdb to capture it!  I really hope gdb
 compatiblity will be fixed :(
What's wrong with gdb?
See my issue 2575 in bugzilla. I worked with a gdb developer to diagnose the issue immediately prior to submitting the bug report. IIRC, gdb can't determine where the code is because some kind of top level offset is missing. Reading my bug report should be more helpful than my memory.
thanks
I see you did post questions to the bugzilla report, and I did provide a response with what details I could deduce without a gdb dev helping me. Do you have enough information to work through the issue? Given how I currently have a program currently behaves differently with or without the -release flag, I'm extra motivated to get gdb working...
I think they gave you basically useless information. I'll have to figure it out by guesswork.
Feb 24 2009