4 ms·
Does a stack trace from a crash in a bound function show the line number of where the bind() took place?
by dustbunny 1y ago
Does a stack trace from a crash in a bound function show the line number of where the bind() took place?
- delusional 1y agoAssuming the stack trace is generated by walking up the stack at the time when the crash happened, nothing that works like a C function pointer would ever do that. Assigning a a pointer to a memory location doesn't generate a stack frame, so there's no residual left in the stack that could be walked back. A simple example. If you were to bind a function pointer in one stack frame, and the immediately return it to the parent stack frame which then invokes that bound pointer, the stack that bound the now called function would literally not exist anymore.
- spacechild1 1y agoNo, but neither does the author's solution.