Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Crash with aliasing effects in Array.map operator #2447

Closed
sb98052 opened this issue Aug 20, 2018 · 0 comments
Closed

Crash with aliasing effects in Array.map operator #2447

sb98052 opened this issue Aug 20, 2018 · 0 comments
Assignees
Labels
bug leaked values Pertaining to values that are unaccounted for or accounted for incompletely. optimized functions Issues around optimizing not global code, but additional functions

Comments

@sb98052
Copy link

sb98052 commented Aug 20, 2018

One my my test cases for aliasing effects in nested optimized functions crashes Prepack:

function f(c) {
    var arr = Array.from(c);
    
    let a = {foo:1};
	function op(o) {
		return a;
	}
    
    let mapped = arr.map(op);
    mapped[0] = 2;
    let x = a.foo;
    return x;
}

global.__optimize && __optimize(f);

inspect = () => {
  return f([{foo:42}]);
};
@sb98052 sb98052 added optimized functions Issues around optimizing not global code, but additional functions leaked values Pertaining to values that are unaccounted for or accounted for incompletely. labels Aug 20, 2018
@sb98052 sb98052 self-assigned this Aug 20, 2018
@sb98052 sb98052 added the bug label Aug 20, 2018
facebook-github-bot pushed a commit that referenced this issue Aug 22, 2018
Summary:
Fixes #2419 #2386 #2439 #2447 #2432 #2437 #2442

* Fix havoced binding not in optimized function
* Allow arrays with widened numeric properties to update index properties
* Fix nested for statement bailout with nested for-in
* Don’t record modified bindings for immutable bindings when havocing

Reviewed By: trueadm, sebmarkbage

Differential Revision: D9456957

fbshipit-source-id: f266b8cc73012b9c721f0f9eebd48347bf0e37ae
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug leaked values Pertaining to values that are unaccounted for or accounted for incompletely. optimized functions Issues around optimizing not global code, but additional functions
Projects
None yet
Development

No branches or pull requests

1 participant