Questions tagged [callstack]
A stack that stores details of the functions called by a program in sequence, so that each function can return on completion to the code that called it.
1,066
questions
-1
votes
1
answer
33
views
why dbghelp cannot resolve symbol from managed callstack?
What's the difference between managed callstack and native callstack, why cannot resolve the symbol from managed callstack by dbghelp? can anyone tell me the basic reason?
0
votes
2
answers
31
views
quickSort javaScript throwing Maximum call stack size exceeded
why is this function throwing error
I am trying to sort array using quickSort with a recursion approach
here I am using the last element in the array as a pivot
let array = [1,0,123,1,3,12,2,45,6]
...
-1
votes
1
answer
28
views
why my async code is not executing inspite of being the free call stack
As per my knowledge async code is executed when the call stack is empty and execution of the async code is finished in web API
But In a given code why my async code which is setTimeout function and ...
0
votes
1
answer
150
views
Does GDB shows wrong data when run over an compiler optimized binary image?
I am having a code like -
100 static void
101 func (<struct type1> *arg1, <struct type2> **arg2)
102 {
103 <struct type2> *var1;
...
...
...
112 var1 = *arg2; /* arg2 is no ...
2
votes
2
answers
36
views
how to have a fixed "anchor" to the main function environment?
In a package, I have a main function that calls a lot of other, unexported functions, with a lot of condition checks everywhere.
When using tidyverse error handling, for instance using the awesome {...
0
votes
0
answers
18
views
LTTng-UST CallStack: mapping function adresses to names does not work in function duration statistics
I have problems in mapping function adresses to their names in LTTng-UST CallStack, more accurate in Function Duration Statistics.
I have no problems in mapping them in Flame Chart and Flame View of ...
0
votes
0
answers
39
views
How can we debug a Qnx core dump file without using Gdb debugger to get the callstack of the crash in Qnx?
I tried using command "coreinfo -vvvv -t my_exe.exe.core" in Qnx but i am not able to get the call stack or the back traces.
i need the back traces without using gdb debugger
0
votes
1
answer
48
views
How to obtain both managed(dotnet) and native(C++) callstack of my project by dbghelp?
My project contains managed part(dotnet) and native(C++) part. I want to hook Winapi CreateFiles in my project by detours and log callstack. Now I have obtained a native callstack by invoking ...
0
votes
0
answers
77
views
New option in GCC : -fsanitize=shadow-call-stack
I have been working with the latest release of gcc (GCC 12.1, released May 6, 2022).
There is a new command-line option : -fsanitize=shadow-call-stack.
The documentation states:
GCC now supports the ...
0
votes
0
answers
75
views
I want to hook win32API CreateFileW by detours and print callstack information captured by CaptureStackBackTrace
I use detours to hook win32 api CreateFile and use CaptureStackBackTrace to get callstack information. and then resolve symbol by SymFromAddr api. but the result shown in terminal is only error 126 ...
0
votes
2
answers
74
views
Valgrind memory leaks : callstack not going back to my code
I tend to do a leak-check with valgrind from time to time, just to ensure my code is leak-free. Usually, either it is leak free, or I get some trace to where the leak occurs (ie even if the leak ...
0
votes
0
answers
34
views
call stack in visual studio code with out debug/build
I have very large source code that can run only on Unix.
I am windows guy, so I brought that source code to windows and opened in visual studio code.
I can't build the source due to dependencies, so ...
0
votes
0
answers
34
views
How to reduce the overhead of libunwind
I am working with the following scenario: I need to get the call stack at the entry point of some APIs. So I wrote some wrappers and use libunwind to perform stack backtracing before executing the ...
0
votes
1
answer
22
views
javascript function execute order
hello just want to know at what order this code function will execute and why
doA( function(){
doB();
doC( function(){
doD();
} )
doE();
} );
doF();
0
votes
1
answer
108
views
Is async in javascript concurrent or parallel?
JavaScript code runs on a single thread, in event loop when method push to web apis return callback function to queue, listener queue and callstack is empty push callback function execute it in ...
1
vote
1
answer
69
views
How Call Stack of JS knows where to continue?
I wanna know how callstack works after one pops.
For example:
function inner() {
console.log("what happens after inner() pops at Call Stack?");
}
function outer() {
inner();
console....
0
votes
0
answers
35
views
Does a loop that is running in callstack prevent click event of button?
I recently started going deeper about behind the scenes of JS and I got this confusion. Let's say I have a button with an onclick event attached to it. Let's say in the call stack a loop is running ...
0
votes
2
answers
2k
views
I am getting RangeError: Maximum call stack size exceeded error in Javascript
I am trying to solve a problem of leetcode through recursion but I am getting an error saying RangeError: Maximum call stack size exceeded maybe I am doing something wrong.
Problem:
Write an algorithm ...
0
votes
1
answer
291
views
React. Why Did You Render. Maximum call stack size exceeded
I'm using React and when am rendering table (with react-table library) I've got warning from why-did-you-render library.
There is a react-table column with Cell field, where I pass my memoized ...
0
votes
2
answers
40
views
Max Call Stack exceeded in Binary Search Python
I am trying to implement Binary Search in Python with recursion.
I write code above:
space = [i for i in range(4096)]
# Recursive:
def binarySearchRec(arr, low, high, target):
if high >= low:
...
0
votes
1
answer
57
views
How to inspect running bash script from outside (i.e. without running it in a dedicated shell)
Imagine an arbitrary already running shell script (bash, sh, ..) that gets stuck in an endless loop and you want to 'look into it' (i.e. get a stack trace or current position in the script) to get an ...
0
votes
1
answer
114
views
Requiring private library in saga with hermes engine enabled causing max call stack size exceeded (native stack depth)
I'm currently trying to migrate our React Native application to leverage the hermes engine. When running the rootsaga with sagaMiddleware.run(rootSaga) we are getting the error: RangeError: Maximum ...
0
votes
1
answer
350
views
Maximum call stack size exceeded for large iterators
I'm trying to convert an iterator to an array. The iterator is the result of calling matchAll on a very long string. The iterator (I assume) has many matches within the string. First I tried it with ...
0
votes
2
answers
115
views
Simulating a simple Call Stack in java
I'm trying to simulate a simple call stack in java, and just run it with simple math functions (such as Fibonacci, Factorial) that I've implemented previously.
Logic wise here's what I'm attempting to ...
2
votes
0
answers
80
views
Confusing results from golang benchmarking of function and go routine call overhead
Out of curiosity, I am trying to understand what the function and go routine call overhead is for golang. I therefore wrote the benchmarks below giving the results below that. The result for ...
0
votes
1
answer
66
views
Perl modules Scope::Upper Sub::Uplevel, what other modules are in use with modern perl?
Trying to ged rid of Sub::Filter from in-house OOP. The code I am fixing is itself evaluated and my newly created wrapper should report proper sub name, but I have just _ _ ANON _ _
$code_after = ...
1
vote
1
answer
59
views
How do I know when my code call stack is too complex?
I know this is likely to be highly subjective and dependent on implementation, but I'm hoping someone could still provide a little bit of guidance. I'm a new SWE and I'm trying to get a feel for how ...
0
votes
2
answers
36
views
Where will this callback function be registered in Node.js and how does it behave?
const add = (n1, n2, callback) => {
setTimeout(() => {
const sum = n1 + n2
callback(sum)
},2000)}
add(1, 4, (sum) => {
console.log(sum) // Should print: 5
})
I ...
1
vote
2
answers
73
views
how to avoid recursion or to fix the problem?
Teaching JS trying to do a ticatactoe game and got a problem with recursion, specifically with 'Maximum call stack size exceeded'.
When I try to make a random move by the computer player I make a ...
2
votes
1
answer
30
views
Does java create all the stack frames for recursion before printing the code for the user?
So here is a simple example of recursion where we count down from a number. When clicking run does java calculate 5,4,3,2,1,0 store those numbers in 6 stack frames only then does it print the code? Or ...
0
votes
0
answers
68
views
Merge Sort question: Maximum call stack exceeded, avoided infinite recursion
Unable to get a terminal output because of error:
Uncaught RangeError: Maximum call stack size exceeded.
Tried to look at similar questions on stackoverflow,
like this Maximum call stack size exceeded ...
0
votes
1
answer
193
views
How much memory is allocated to call stack?
Previously I had seen assembly of many functions in C++. In gcc, all of them start with these instructions:
push rbp
mov rbp, rsp
sub rsp, <X> ; <X> is size of frame
I know ...
0
votes
1
answer
42
views
In Groovy(/Java) how would I remove the current function from the stackTrace when throwing an Exception?
I'd like to provide a function for throwing exceptions rather than throwing them directly. E.g. instead of writing:
def foo() {
def result = command_result("foo");
if (!result) {
...
1
vote
0
answers
27
views
Max call stack is greater in while loop
all.
Would be grateful if someone could clarify the following.
We have a basic factorial function and a for loop with a try catch block which runs the function until error
"Maximum call stack ...
1
vote
1
answer
46
views
Javascript - How to execute a function on a given time ? (with variable time periods)
I have to make a request to the backend server to retrieve some data, and inside the response comes the hour of the day that I have to make the request again. For example: I make the request at 12:00 ...
0
votes
0
answers
37
views
different between call instruction when calling main() and normal function for assembly language [duplicate]
I am studying asm language by compiling c source code into asm langugae.
I ready known the call instruction is equivalent of
push ret_address
jmp my_func
But it seem that calling a main function is ...
0
votes
0
answers
477
views
Maximum call stack size exceeded due to recursive function
I'm trying to populate data from an array through a recursive function, and this function would get called upon each time the data or search value is updated. I understand that to avoid call stack ...
0
votes
0
answers
100
views
Why are primitives types stored in call stack instead of the heap?
My understanding is that call stack is supposed to keep track of which codes are getting executed, and memory heap is where the data is stored. However, I recently discovered that call stack also ...
0
votes
1
answer
68
views
Checkpointing with LD_PRELOAD -- how to manipulate the instruction pointer and call stack?
The LD_PRELOAD technique allows us to supply our own custom standard library functions to an existing binary, overriding the standard ones or manipulating their behaviour, giving a fun way to ...
0
votes
0
answers
52
views
can i push and call a proc inside a proc?
I want to call a proc in another proc . the proc from the inside must be pushed before, the inside proc has ret 4. when i run it my computer stops working is there a way to do this? maybe add another ...
0
votes
0
answers
123
views
JavaScript: What is the data structure for the call stack?
I'm writing an article about JS concurrency model and event loop. I've read many (even internally) conflicting articles regarding the data structures of the call stack and Execution Contexts.
A ...
0
votes
1
answer
47
views
Tail call stack
I'm having trouble understanding the Stack manipulation needed in order to implement Tail call in assembly language.
When we have a Tail call to function We basically want to override the current ...
0
votes
0
answers
138
views
Is there a way to access the name of the procedure that was running when an exception was raised? --Delphi 10.4 [duplicate]
I'm creating an error report generator as part of a global exception handler. Right now I'm relying on the user to tell us what exactly they were doing when the exception happened.
I'm already adding ...
1
vote
1
answer
430
views
how to disable CET and shadow stack in gcc
I am teaching OS and I need to explain the functioning of the stack and the function call convention in C by using real disassembled code of a simple C function.
For didactic purpouses, in a first ...
1
vote
1
answer
170
views
Arguments in call stack above locals instead of below return address? [duplicate]
I'm trying to get my head around a function's call stack with some practical examples. In all of the diagrams explaining this, it is laid out like [Local variables][Return Address][Arguments] (low ...
4
votes
3
answers
80
views
Why are function expressions not included in the variable object of the Execution Context?
While going through the Execution Context part of the JavaScript.The Core. (1st ed.) by Dmitry Soshnikov, I came across this line that explicitly says that function expressions are not included in the ...
2
votes
0
answers
66
views
C# dump analysis: newbie question: where's the rest of my callstack?
I have quite some experience in debugging memory dumps, so now that I have a C# problem, I try to solve this using memory dump analysis too, but this seems not to work:
When I use my user-interactive ...
6
votes
2
answers
579
views
Callback function executing in the call stack even when it's not empty
When the click event is fired from the mouse, it behaves as expected:
First the listener 1 is pushed into the stack where it queues promise 1 in Microtask Queue(or Job Queue). When listener 1 is ...
3
votes
3
answers
204
views
Is there a limit on how many local variables we can declare in C?
Given the fact that local variables inside a function in C get pushed to the stack once the function is called (After pushing the variables being passed to the function), is there any limit to the ...