Closed Bug 482958 Opened 15 years ago Closed 13 years ago

TM: We keep deep-bailing from non-_FAIL builtin functions

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jorendorff, Assigned: jorendorff)

References

Details

Attachments

(1 file)

We have had several cases of this now.  I see two ways to solve it:

1. Make every non-trivial builtin function _FAIL and get rid of _RETRY altogether.

2. Annotate all non-_FAIL builtins with a new annotation, JS_STAYS_ON_TRACE, and change jsstack.js to detect when one of them does anything that could end up deep-bailing (like calling a non-JS_STAYS_ON_TRACE function).

At the moment I favor hacking together option 1 to see if it regresses perf.
Attached patch Approach 1Splinter Review
Here is a patch for approach 1.

Good: bench.sh showed no change in speed.

Bad: Note that diffstat shows a net increase in code.

Bad: The patch does not fix holes where we emit calls to specific builtins via lir->insCall().  In those cases the _FAIL/bailExit machinery still isn't being used, and some of them can reach error handlers (especially OOM, see js_NewInstance).

I need to sleep on it.  I don't think I like _FAIL this much, but we need to kill this class of bugs.
Alternative 2 keeps RETRY so we can have faster calls to builtins whose only way to "fail" is OOM on trace, without unwanted effects to clean up. Looks like ~22 so far in js*.cpp -- more to come? Anyway, sleep well!

/be
Obsolete with the removal of tracejit.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: