callstack

What is the use of -fno-stack-protector?

人盡茶涼 提交于 2019-11-29 16:51:42
问题 I have written an application in C, and I'm trying to understand what is the purpose of the -fno-stack-protector command when compiling. For my specific application, it makes no difference if I use this command or not in terms of protecting against buffer overflow. I've read online that the -fstack-protector and -fno-stack-protector commands enable and disable respectively the stack-smashing protector, but if I'm compiling the application myself, how can the protector be enabled beforehand?

Obtain a callstack in Clojure

℡╲_俬逩灬. 提交于 2019-11-29 16:31:25
问题 When I run my Clojure programs and get an error during execution, I notice that the message printed by the REPL only contains the top level line number from the script I executed. Can I get it to dump a call stack (which references the various line numbers of Clojure code)? For example: user=> (load-file "test.clj") java.lang.IllegalArgumentException: Wrong number of args (1) passed to: user$eval134$fn (test.clj:206) user=> It would be nicer if I knew more than just the top level call (line

What is the default stack size in Node.js?

别来无恙 提交于 2019-11-29 06:31:30
问题 I know how to set the stack size thanks to: How can I increase the maximum call stack size in Node.js But, what is the default size? (ie how do I get to the PHP equivalent of phpinfo() ) 回答1: The simple answer is that the default stack size is 492 kBytes (32-bit) and 984 kBytes (64-bit). As commented by soyuka try this: $ node --v8-options | grep -B0 -A1 stack_size 来源: https://stackoverflow.com/questions/20748061/what-is-the-default-stack-size-in-node-js

Is there a way to examine the stack variables at runtime in C#?

℡╲_俬逩灬. 提交于 2019-11-29 04:56:37
Is there a way to dump the contents of the stack at runtime? I am interested in both the parent functions information (name, parameters, line) which I know I can get with the StackTrace and StackFrame classes. However, I would also like to get the variables in the stack (local variables declared in the method that called the one is currently executing). Since the Visual Studio debugger can do this, I think there may be a way to also do it at runtime within the code. Is there such a way? I suppose there are two ways of achieving this. Your first option is to use an AOP framework to inject

How to dump or search in call stacks of ALL threads in Visual Studio

白昼怎懂夜的黑 提交于 2019-11-29 01:29:47
问题 How to dump or search in call stacks of ALL threads in Visual Studio? We have a server process to debug and it has hundreds of threads running, so it should be hard to manually check each threads. I know "thread apply" in gdb can do this kind of things. So I was wondering is there anything similar available in visual studio's debugger. Also I was using visual studio 2005, so please give a solution for VS 2005 ( search in all call stack is provided in VS 2010...). 回答1: I just had the same

Why don't Minidumps give good call stacks?

荒凉一梦 提交于 2019-11-28 17:36:49
I've used minidumps on many game projects over the years and they seem to have about a 50% chance of having a valid call stack. What can I do to make them have better call stacks? I've tried putting the latest dbghelp.dll in the exe directory. That seems to help some. Is Visual Studio 2008 or 2010 any better? (I'm still on VS 2005). The code I use looks like this sample . One thing you can do to improve the accuracy of call stacks found in dumps is to use a debugger other than Visual Studio -- specifically, use WinDbg or another tool that uses the "Windows Debugger" debugging engine found in

Android Studio - Where can I see callstack while debugging an android app?

时光总嘲笑我的痴心妄想 提交于 2019-11-28 17:07:43
While on a break point, how do I see the call stack to find the callee method/function? Nickolai Astashonok At the bottom panel you should have "5: Debug". Click on it and select "Debugger -> Threads" You may need to find the "Threads" icon on the far right, or even click the "Restore Layout" button on the left to restore this window. Seems like there is an UI-Bug in the Android Studio (1.x, 2.x and 3.x). For me the "Frames/Threads" Panel was completely hidden behind the toolbar, so I had to change the size from the "variable" panel by dragging its left border to reveal the "Frames/Threads".

How To Loop Through All Active Thread in iPad app

谁都会走 提交于 2019-11-28 16:55:07
In the iPad app that I'm creating, I'm trying to handle the uncaught Exceptions by outputting the callStackSymbols of the exception. This can be done with [NSException callStackSymbols] However, I'd like to be able to see the callStackSymbols on all the other active threads as well. I know I can use [NSThread callStackSymbols] on any thread, but I need to loop through all the active threads to do so. Is this possible? This is a complex area, as Sedate Alien noted. You will need to implement your own stack walking to retrieve a stack trace from the other active threads; APIs such as backtrace(3

GAS: Explanation of .cfi_def_cfa_offset

夙愿已清 提交于 2019-11-28 14:35:58
问题 I would like an explanation for the values used with the .cfi_def_cfa_offset directives in assembly generated by GCC. I know vaguely that the .cfi directives are involved in call frames and stack unwinding, but I would like a more detailed explanation of why, for example, the values 16 and 8 are used in the assembly outputted by GCC in compiling the following C program on my 64-bit Ubuntu machine. The C program: #include <stdio.h> int main(int argc, char** argv) { printf("%d", 0); return 0; }

Stack overflow exception in c# setter

孤街浪徒 提交于 2019-11-28 13:20:13
This is simple to explain: this works using System; using ConstraintSet = System.Collections.Generic.Dictionary<System.String, double>; namespace ConsoleApplication2 { class test { public ConstraintSet a { get; set; } public test() { a = new ConstraintSet(); } static void Main(string[] args) { test abc = new test(); Console.WriteLine("done"); } } } this does not using System; using ConstraintSet = System.Collections.Generic.Dictionary<System.String, double>; namespace ConsoleApplication2 { class test { public ConstraintSet a { get { return a; } set { a = value; } } public test() { a = new