Misc instrumentation and runtime TODOs #577
Labels
a-lot-of-work
This issue requires a lot of work, and is by no means easily taken care of
async
bug
Something isn't working
call-graph
Related to Call Graph rendering
enhancement
New feature or request
instrumentation
Related to how we instrument the code in `dbux-babel-plugin`
priority
NOTE: This issue is a bit of a septic tank of many small things that can be approved with several features. They generally require instrumentation and runtime fixes, and cannot be fixed solely in
dbux-data
anddbux-code
.Potentially Critical Bugs and Features
jest
support +javascript-algorithms
await (async () => await A)();
(flat_vs_nested.js
)_readProperty
is used for all prop access; there is a few places left in the code, especially in the monkey patcherssequelize
→ssce1
: inchai
'soverwritingMethodWrapper
(there used to be many unwanted proxy handlerget
context recordings)DataNode TODOs
DataFlowNodeProvider.buildNodes
might missValue creation
trace/refDataNode
. E.g.var a = JSON.parse('[{ }, { }]');
implicitly creates three objects and threeValueRef
s, but onlya
gets oneDataNode
. The other 2 share itsnodeId
.x
invar x = a[0];
,Data Flow View
does not list the actual creation trace.async
function calls do not propagate params<->args data flowDataNode
ordercallExpressions.js
->buildTraceCall*
first generates arguments, which traces all argumentsRuntimeMonitor.traceBCE
is called which adds the spreadDataNodes
DataNode
monkey patching:__defineGetter__
,defineProperty
,defineProperties
etc.hexo#4
, selectasset.path
inhexo/lib/plugins/tag/asset_img.js:24
value
parameter of thecast
function (line 61)return
valuecache
of thesetGetter
callback function (line 74)assest.path
, add a getter on 'path' using__defineGetter__
, then query again. Our heuristic links the two query results because they share the sameaccessId
. See minimal reproducible example ingetter2.js
on branchissue#561
arrays-push.js
, selecta[2]
. Why is...a
behinda[2]
in data flow (even though it occurs beforehand)?staticTrace.staticContextId !== staticContext.staticContextId
Other TODOs
Program
context for top-levelawait
(with potentialfinalize
/catch
)popProgram
to callfixContext
(in case of top-levelawait
)?*.mjs
filestracesDisabled
config and add todocs
prettyLogs
for dbux-internal loggingprocess.cwd
polyfill won't cause problems: Tracing certain system polyfills can lead to infinite loops or incorrect results (e.g.process.cwd
) #611isTerminalNode
: check whether current node has no Pre update, and no one else in CHAIN (via asyncEdges.to) has more than one Pre updatedomEl.onclick = cb
on
, target is a GlobalEventHandler, previous value isnull
(if not assigned before)Editor.md
popFunction
trace isthin
, but should not be* [ ] fix:ThrowArgument
always gets recorded twiceimport
: CHAIN/FORK the imported file's CGR to callermodule.exports
(or somehow overcome circular reference warnings)?Done
promiseCtorId
to all events created when callingexecutor
PreAwait
orPreCallback
orPreThen
, but only pre and postpromiseId
s reference each otherthen
s "pre-event"s and it would still become a CHAIN)prettyLogs
inside of target application (or remove it's reading of runtime values)@dbux/cli
, triggered by@dbux/babel-plugin/src/index.js
popProgram
does not seem to work correctly (trace not selectable) when error was thrownsamples/__samplesInput__/objectMethods2.js
popProgram
is not shown anymore?pw=.*
pb=v8-compile-cache
, since we just cannot handle this type of multi-layered monkey patching well enoughvar script = new vm.Script(wrapper, {
inv8-compile-cache
is unhappy with dynamic callback patching^^^^
instead of^
)Project.installPackages
, usewriteMergePackageJson
+npmInstall()
instead ofyarn add x
/npm i x
Process.js
-> inheritenv
, instead of overriding itexpress#1
again (woopsi)net
/IO
queue)timeout
(Timeout error during handshake ambiguously reported aswebsocket error
; stops re-connection attempts socketio/socket.io#4062)pingTimeout
(Socket.io disconnect with ping timeout randomly socketio/socket.io#2769)notepack
's encoding problems #570!
does notaddDefaultTrace
correctly -> trace of operand not recorded inif
statement; e.g.if (!x)
#602RuntimeClient
when runningnode-fetch
? (bugs out every few runs, sometimes persistently)SendQueue
fixError.captureStackTrace
callback problemhexo#4
(->Promise.each
not instrumented)async-js
Promise.all
async-js
sequelize#fOC
CallbackPatcher
not patchingcall
,apply
,bind
Editor.md
sometimes does not send packets of certain event handlersClient
'sstayAwake
cmUnbindScroll
is one of the affected rootssend
is never calledSendQueue
had a race condition. Fixed. Also added data sanity validation to make sure we'll see it if it happens again.call
getsundefined
input (seehexo#4
-> shows up as a warning)OptionalCallExpression
bind
,call
,apply
isClass
(cannot reproduce?)The text was updated successfully, but these errors were encountered: