Tracking string creations

14 views
Skip to first unread message

Mark Letterman

unread,
Aug 23, 2023, 9:12:13 AM8/23/23
to v8-dev
So I compiled V8 and D8 on my Windows machine and I have some very big javascript code that is pretty obfuscated and which I can run on my machine perfectly fine. I want to recompile my V8 so that I can track creation of certain string inside of this javascript. For example, I want to see if anywhere in the code, string named "_loopy" gets created or if any name property like this is being initialized. Where in /v8/src can i potentially look for such thing? Unfortunately monkey patching and doing manipulation on Javascript level is not possible for me due to integrity checks. Is there any way I can do such thing on V8 level and to recompile it accordingly so i can see if such thing gets created or not? 
Im trying to find some type of String constructor and just print whatever it gets called inside of it. Is this possible?

Best regards

Patrick Thier

unread,
Aug 23, 2023, 9:19:07 AM8/23/23
to v8-...@googlegroups.com
You can have a look at the factory methods creating strings: https://crsrc.org/c/v8/src/heap/factory.h;drc=09587a472311c0358c3ba1c3666a118d3e704d5b;l=233

--
--
v8-dev mailing list
v8-...@googlegroups.com
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 v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/26af2ee8-7c67-42a2-a4d2-99976922a699n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages