Questions tagged [function-address]

The tag has no usage guidance.

function-address
Filter by
Sorted by
Tagged with
0 votes
1 answer
797 views

A value of type"bool *" cannot be assigned to an entity of type "bool (*)(int enemy_piece)"

I cannot declare a address to the function pointer that I created earlier and I cannot understand what am i doing wrong. I declared function pointer to the function that returns a bool and takes 1 ...
kims9's user avatar
  • 45
2 votes
1 answer
90 views

Why the function address is different before and after I run the code? [duplicate]

the source code is here #include <stdio.h> int gcd(a, b) { if (b == 0) return a; return gcd(b, a % b); } int main(int argc, char **argv) { int a = atoi(argv[1]); int b = atoi(argv[2]); ...
Ca Chen's user avatar
  • 73
0 votes
1 answer
201 views

Wrong function address

Here’s the code: __declspec ( naked ) void nseel_asm_assign(void) { __asm { fld qword ptr [eax] fstp qword ptr [ebx] } } __declspec ( naked ) void nseel_asm_assign_end(void) {} The ...
Soonts's user avatar
  • 21k
1 vote
3 answers
65 views

Odd behavior on printing function addresses in Python

I write the following code in Python: def fib(n): a, b = 0, 1 while b < n: print(b, end=' ') a, b = b, a + b print(fib, fib(10)) I think the correct output should be: &...
Amir Saniyan's user avatar
  • 13.4k
2 votes
0 answers
2k views

How to get line number by function offset address from dumps

I was using kasan first time and got error of following type ================================================================== BUG: AddressSanitizer: out of bounds access in kmalloc_oob_right+0x65/...
hdk's user avatar
  • 21
0 votes
4 answers
3k views

Store function address into global variable

Consider the following code: void f() {}; void* v = f; int i = f; int main() { } Why storing function address into int variable gives me an error: error: initializer element is not a compile-time ...
αλεχολυτ's user avatar
1 vote
2 answers
3k views

How to get a function address from current executable?

I need to know the function address from current executable on Solaris 10 using C++ (I'm using GNU g++ 4.9.2). For example, I have a function say as: void doSomething(const char *p), that may or may ...
Dr. Debasish Jana's user avatar
0 votes
1 answer
91 views

confused with address of function in c

i am confused! are all of the following printf's the correct way to print the addresses of functions? Let me tell you my confusion as well. Everytime i run all of these printf's (that is, 1st printf, ...
gj1103's user avatar
  • 127
0 votes
1 answer
1k views

finding variable and function memory addresses in shell

In shell programming, is there any way to find the variable and function addresses? Something like in c or c++ when we output the &x, we can get x memory address.
user1694236's user avatar
1 vote
2 answers
96 views

Function addresses consistant?

This is using the C langauge with VC++ 2010 on windows 7 64 bit. Is there a way to reliably and consistently access the address of a function (c linkage) so that it's the same address on every run of ...
Tom Tetlaw's user avatar
1 vote
1 answer
2k views

How to call exported function from dll in C/C++?

My aim is to call some function via its address. How can I do it? I have done the next work for such aim, but at first(1) - I've got access violation ( don't know why ) and with the second I have ...
Secret's user avatar
  • 2,637