Looking at the disassembly (along with an instruction trace) of ld.so installed in Ubuntu 9.04, I swear I'm seeing data being stored below the stack pointer (i.e., beyond the top of the stack) at times. This seems insane to me, but maybe this is more common than I think. Does this happen often?
Here's what I see:
ebp: 0xBF8269E8, esp: ...
I want to disable the stack trace getting generated when an exception is thrown.
I have used,
Runtime.getRuntime().traceInstructions(false);
Runtime.getRuntime().traceMethodCalls(false);
but still i could see the trace getting generated. How can you do that? Also i need to detect whether some one is debugging my class.
I want to di...
I have a struct call 'A', which has an attribute 'i', like this:
typedef struct a {
a() { i = 0;}
int i;
} A;
And I would like to maintain a stack of A in my Main class:
class Main {
public:
void save();
void doSomethingToModifyCurrentA();
void restore();
private:
A currentA;
stack<A> aStack...
Hi there.
I'm porting a DLL written in C from WinCE 5.0 to WinCE 6.0 on an ARM target. This DLL is called by a .NET software. On WinCE5.0, everything runs fine. On WinCE6, I have the following problem:
on InitInstance() of my DLL, I can call anything without problem (for example MessageBox()) or uses recursivity.
Passed that point, th...
What is stack unwinding? Searched through but couldn't find enlightening answer!
Thanks in advance.
...
Hi, guys. I have a question about the stack size of a process on Linux. Is this stack size determined at linkage time and is coded in the ELF file? I wrote a program which print its stack size by pthread_attr_getstacksize(&attr, &stacksize);. And if I run this program directly from shell, it gives a value of about 10MB. But when I exec i...
my function:
struct hostent * gethost(char * hostname){
if(/*some condition under which I want
to change the mode of my program to not take a host*/){
return null
}
else{
struct hostent * host = gethostbyname(hostname);
return host;
}
}
in main:
struct hostent * host = gethost(argv[2])...
is it possible to get the effective starting address of a stack after completing stack operations like push and pop in assembly programming?
...
Hi All,
I was ready a article posted on wikipedia on Tail recursion: http://en.wikipedia.org/wiki/Tail_call
Now here at the end of the article, the example shows Stack Pointer being used to access the arguments passed to the function call in the assembly pseudo code. Isn't this wrong? I mean the arguments are accessed by the callee by ...
Why does the following not work:
#include <iostream>
#include <fstream>
#include <stack>
std::stack<std::ifstream> s;
-PT
...
As far as I assume, std::stack and all such 'handmade' stacks work much slower than stack which is applications one.
Maybe there's a good low-level 'bicycle' already? (Stack realization).
Or it's a good idea to create new thread and use it's own stack?
And how can I work directly with application stack? (asm {} only?)
...
My program crashed when I added the option -fstack-check and -fstack-protector. __stack_chk_fail is called in the back trace.
So how could I know where the problem is ? What does -fstack-check really check ?
The information about gcc seems too huge to find out the answer.
...
Is there a common portable idiom in numerics code (I'm writing in D, but language-agnostic, C and C++ answers would be useful to me, too) to ensure that all stack-allocated doubles that are accessed frequently are aligned on 8-byte boundaries? I'm currently optimizing some numerics code where misaligned stack-allocated doubles (only ali...
Hi there,
I'm trying to solve this problem : http://uva.onlinejudge.org/external/7/732.html.
For the given example, they give us the original word, for example TRIT and the target "anagramed" string, TIRT.
Objective: We have to output all the valid sequences of 'i' and 'o' (push and pop's, respectively) which produce the target string ...
I have a local that's only used for the purposes of checking the result from another function and passing it on if it meets certain criteria. Most of the time, that criteria will never be met. Is there any way I can avoid this "extra" local?
I only have about 1MB of storage for my binary, and I have several thousand function calls that...
I don't know how to explain my problem.... but
I have two RRD files:
a.rrd
b.rrd
I'm trying to sum both of the files and STACK them up in the graph.
like:
my $bla = RRDs::graph "-",
"--title","Test",
"--imgformat=PNG",
"--width=680",
"--height=200",
"DEF:Default0_=a.rrd:default:AVERAGE",
"DEF:Real0_=a.rrd:re...
In C#, what is an execution frame (also related to this I have heard of activation frame).
IIRC it is a slot where method parameters go but cannot remember all of the details.
Thanks
...
I just moved a bunch of code into a separate framework. Nothing has changed in the code since the move and it compiles fine. However, on runtime, It crashes with "misaligned_stack_error". I've been looking around and some people are saying -mstackrealign fixes it, however I have added it to the C flags for both projects in Xcode and it s...
as a beginner of asm, I am checking gcc -S generated asm code to learn.
why gcc 4.x default reserve 8 bytes for stack when calling a method?
func18 is the empty function with no return no param no local var defined.
I can't figure out why 8 bytes is reserved here (neither any forum/site mention for the reason, ppl seems take it for g...
I'm taking a class in computer security and there is an extra credit assignment to insert executable code into a buffer overflow. I have the c source code for the target program I'm trying to manipulate, and I've gotten to the point where I can successfully overwrite the eip for the current function stack frame. However, I always get a S...