On Thu, Nov 8, 2018 at 10:31 PM <[email protected]> wrote: > Hi, > > I am using V8 in an asp.net application. I wrote some c++ code to expose some > V8 functionality to C# via PInvoke. I create V8 Isolate object (in future > we will use isolate pool for reuse.) for every request and dispose end of > the request. In our test environment I found sometimes V8 throws exception > (RangeError: Maximum call stack size exceeded). I also verified their is no > recursion in script. For that request V8 execute react, react-dom server and > a simple script that has react view. In order to repro this I created a > simple console app and ran it 10000 times but couldn't repro it. I also ran > 200 thread simultaneously which created isolate object and ran script then > dispose isolate but still not able to repro this. Do you guys any suggestion > how can I dig into this and what is the configuration I am missing for my web > application. > > Thank you > Siam
Start V8 with `--abort_on_stack_or_string_length_overflow` (see `v8::V8::SetFlagsFromString()`) and, if possible, run your application in a debugger. The abort backtrace should hopefully yield some clues. Reasons beyond simple recursion for a stack overflow are complex regular expressions or (very) deeply nested source code. If V8 somehow guesses the stack size wrong, you can correct it with `--stack_size=<size in kb>`. Note that it tells V8 to _assume_ the stack is this large, not _create_ a stack this large. -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
