On Fri, May 19, 2023 at 2:25 PM Matt Henkes <matt...@cypress.io> wrote:
>
> Thanks for the tip!
> With your help i was able to run mksnapshot through the debugger. Here's my 
> vsCode launch.json file for anyone who comes along after me.
>
> ```
> {
> // Use IntelliSense to learn about possible attributes.
> // Hover to view descriptions of existing attributes.
> // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
> "version": "0.2.0",
> "configurations": [
> {
> "name": "(lldb) Launch mksnapshot",
> "type": "cppdbg",
> "request": "launch",
> "program": "${workspaceFolder}/out/x64.debug/mksnapshot",
> "args": [
> "${workspaceFolder}/snapshot.js",
> "--turbo_instruction_scheduling",
> "--target_os=mac",
> "--target_arch=x64",
> "--embedded_src",
> "${workspaceFolder}/out/x64.debug/gen/embedded.S",
> "--turbo-profiling-input",
> "${workspaceFolder}/tools/builtins-pgo/x64.profile",
> "--embedded_variant",
> "Default",
> "--random-seed",
> "314159265",
> "--startup_blob",
> "snapshot_blob.bin",
> "--no-native-code-counters",
> "--verify-heap"
> ],
> "stopAtEntry": false,
> "cwd": "${fileDirname}",
> "environment": [],
> "externalConsole": false,
> "MIMode": "lldb",
> "sourceFileMap": { "../../": "${workspaceFolder}" }
> }
> ]
> }
>
> ```
>
> I was able to get a callstack at the crash, I'm not sure if it helps, but i'm 
> poking further into it.
>
> [Unknown/Just-In-Time compiled code] (Unknown Source:0)
> mksnapshot!v8::internal::GeneratedCode<unsigned long, unsigned long, unsigned 
> long, unsigned long, unsigned long, long, unsigned long**>::Call(unsigned 
> long, unsigned long, unsigned long, unsigned long, long, unsigned long**) 
> (/Users/matthenkes/Source/v8-build/v8/src/execution/simulator.h:157)
> mksnapshot!v8::internal::(anonymous 
> namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous 
> namespace)::InvokeParams const&) 
> (/Users/matthenkes/Source/v8-build/v8/src/execution/execution.cc:426)
> mksnapshot!v8::internal::Execution::CallScript(v8::internal::Isolate*, 
> v8::internal::Handle<v8::internal::JSFunction>, 
> v8::internal::Handle<v8::internal::Object>, 
> v8::internal::Handle<v8::internal::Object>) 
> (/Users/matthenkes/Source/v8-build/v8/src/execution/execution.cc:537)
> mksnapshot!v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) 
> (/Users/matthenkes/Source/v8-build/v8/src/api/api.cc:2112)
> mksnapshot!v8::Script::Run(v8::Local<v8::Context>) 
> (/Users/matthenkes/Source/v8-build/v8/src/api/api.cc:2040)
> mksnapshot!v8::internal::(anonymous namespace)::RunExtraCode(v8::Isolate*, 
> v8::Local<v8::Context>, char const*, char const*) 
> (/Users/matthenkes/Source/v8-build/v8/src/snapshot/snapshot.cc:736)
> mksnapshot!v8::internal::CreateSnapshotDataBlobInternal(v8::SnapshotCreator::FunctionCodeHandling,
>  char const*, v8::Isolate*) 
> (/Users/matthenkes/Source/v8-build/v8/src/snapshot/snapshot.cc:755)
> mksnapshot!(anonymous namespace)::CreateSnapshotDataBlob(v8::Isolate*, char 
> const*) (/Users/matthenkes/Source/v8-build/v8/src/snapshot/mksnapshot.cc:160)
> mksnapshot!main 
> (/Users/matthenkes/Source/v8-build/v8/src/snapshot/mksnapshot.cc:286)
> dyld!start (Unknown Source:0)
>
> In the debugger i am using, lldb, the variables at the time of the crash 
> aren't very useful. They just numbers and addresses when i'd expect them to 
> be an array. (I'm currently a JS dev and haven't looked at C++ in 20 years, 
> so my expectations might be off lol). Anyone know if variables would be more 
> readable if i used GDB instead of LLDB?

I don't expect that to make much of a difference. That line in the
second call frame is where V8 calls into generated machine code and
such crashes are just really, really hard to debug.

The best advice I can give you at this point is to upgrade to a newer
V8 version and see if the problem is fixed. 10.7.71 is almost 9 months
behind.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/CAHQurc8S90QQLo_ehnNnPFXEQw2V8LDpcyjVD9SpjR0Bao-_Tg%40mail.gmail.com.

Reply via email to