question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Assertion failure in InlineCache.cpp

See original GitHub issue

I discovered this while trying to produce a repro for #6160. The following code when run in ch hits an assertion in InlineCache.cpp:

WScript.Attach(() => {
    let iter = g();
    iter.next();
    iter.next();
});
(async () => {
    await 777;
    await 1206;
    WScript.Detach(() => {});
})();

function* g() { yield 0; }

The assertion that was hit is: https://github.com/microsoft/ChakraCore/blob/master/lib/Runtime/Language/InlineCache.cpp#L570

        Assert(!needsProtoInvalidation || isProtoRegistered);

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
zenparsingcommented, Nov 4, 2019

@fatcerberus Yep, I already tried to repro this on my branch 🤞 but it’s there as well. It’s more about generators than anything else.

It sounds like #6160 might be the same thing (or at least closely related). I haven’t tried to dig into solutions yet but I hope to take a look sometime this week.

0reactions
fatcerberuscommented, Nov 7, 2019

Assuming debugging is enabled for a given session, JsDiagStartDebugging is called almost immediately after context creation, and runs continuously until the runtime is freed. This lets me run a debug server over loopback to allow attaching an ssj instance on-demand at any time.

I already made this commit in my own repo as a workaround - https://github.com/fatcerberus/minisphere/commit/71ccfc825017c7efb07262fa741fb9015d53b6fb

The only thing that concerned me with that workaround is that in my case, without it, CC hits a failfast (https://github.com/microsoft/ChakraCore/blob/master/lib/Runtime/Debug/DebugContext.cpp#L359) which struck me as a potential security issue I might just be sweeping under the carpet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Assertion failure in InlineCache.cpp · Issue #6323 · chakra-core ...
I believe we have a bad interaction between generator functions (which keep an interpreter stack frame on the heap) and the debugger.
Read more >
1375435 - Assertion failure: resumePointsEmpty(), at js/src/jit ...
The assertion is in JIT code and I don't know what the implications are if something is wrong there with the inline cache....
Read more >
Assertion Error - visual c++ - Stack Overflow
In vc++6.0 MFC Application Project , I will not get the compile Error , but when i run the project ...
Read more >
Bug ID: JDK-6956958 assert(is_clean() || is_call_to_compiled ...
The assertion failure was only seen in one test in one configuration. I have no idea (yet) how reproducible this failure is. Here...
Read more >
Adventures in gdb « Tim Chevalier's blog
File js/src/jit/BaselineCodeGen.cpp: 2590: bool ... return “record”), and got an assertion failure in the emitGuardNonDoubleType() method in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found