Bug 444162 - Stack overflow on recursive JavaScript structures
Summary: Stack overflow on recursive JavaScript structures
Status: REPORTED
Alias: None
Product: okteta
Classification: Applications
Component: Structures Tool (show other bugs)
Version: 0.26.6
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Alex Richardson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-21 01:43 UTC by Nagy Tibor
Modified: 2021-10-21 01:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Backtrace (259.87 KB, application/gzip)
2021-10-21 01:43 UTC, Nagy Tibor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nagy Tibor 2021-10-21 01:43:46 UTC
Created attachment 142700 [details]
Backtrace

SUMMARY
When defining the following recursive JavaScript structure Okteta crashes with a stack overflow. I don't remember anymore what I originally wanted to achieve by writing a cursed structure like this, this script has been sitting on my machine for years.

STEPS TO REPRODUCE

function init() {
    var x = struct({});
    x.fields["X"] = array(x, 0);
    return x;
}

EXPECTED RESULT
Fail gracefully on trying to execute this script.

OBSERVED RESULT
After enabling this structure Okteta immediately crashes with a stack overflow. You won't be able to bring up Okteta's GUI anymore to disable this script, oktetastructuresrc must be edited manually to disable it. Could be used to annoy people through Get Hot New Stuff.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.23
KDE Plasma Version: 5.23.1
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.3