Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeated calls to class setter triggers assertion #3423

Closed
suwc opened this issue Jul 24, 2017 · 2 comments
Closed

Repeated calls to class setter triggers assertion #3423

suwc opened this issue Jul 24, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@suwc
Copy link

suwc commented Jul 24, 2017

class B {
    set x(v) { print("B.prototype.set x"); this._x = v; }
    get x() { print("B.prototype.get x"); return this._x; }
}

class A extends B {
    set x(v) { print("A.prototype.set x"); super.x = v + 100; }
    get x() { print("A.prototype.get x"); return super.x; }
}

var a = new A();
a.x = 100;
print(a.x);

var a1 = new A();
a1.x = 100;
print(a1.x);

Expected:

A.prototype.set x
B.prototype.set x
A.prototype.get x
B.prototype.get x
200
A.prototype.set x
B.prototype.set x
A.prototype.get x
B.prototype.get x
200

Actual

A.prototype.set x
B.prototype.set x
A.prototype.get x
B.prototype.get x
200
A.prototype.set x
ASSERTION 15068: (lib\runtime\Language/InlineCache.inl, line 356) setterValue == nullptr || setterValue == function
 Failure: (setterValue == nullptr || setterValue == function)
FATAL ERROR: ch.exe failed due to exception code c0000420
@suwc suwc self-assigned this Jul 24, 2017
@suwc suwc added this to the 1.6 milestone Jul 24, 2017
@pleath
Copy link
Contributor

pleath commented Jul 24, 2017 via email

@suwc suwc changed the title Repeated call to class setter triggers assertion Repeated calls to class setter triggers assertion Jul 24, 2017
@suwc
Copy link
Author

suwc commented Jul 24, 2017

@pleath this came up when I work on super.x caching. Will fix both in one PR

suwc pushed a commit to suwc/ChakraCore that referenced this issue Jul 25, 2017
…cess

Accesses to super properties are cached on 'this' object (vs. the
"super" object), causing conflict between e.g. super.x and this.x.
Similar conflicts cause Issue#3423 for GetProperty cases.
Fix by adding 'isSuper' flag to use appropriate object for caching.

Fixes chakra-core#3064, chakra-core#3423
@dilijev dilijev added the Bug label Jul 26, 2017
suwc pushed a commit to suwc/ChakraCore that referenced this issue Aug 8, 2017
…cess

Accesses to super properties are cached on 'this' object (vs. the
"super" object), causing conflict between e.g. super.x and this.x.
Similar conflicts cause Issue#3423 for GetProperty cases.
Fix by changing to object/propertyObject for caching super property
accesses.
suwc pushed a commit to suwc/ChakraCore that referenced this issue Aug 9, 2017
…cess

Accesses to super properties are cached on 'this' object (vs. the
"super" object), causing conflict between e.g. super.x and this.x.
Similar conflicts cause Issue#3423 for GetProperty cases.
Fix by changing to object/propertyObject for caching super property
accesses.
suwc pushed a commit to suwc/ChakraCore that referenced this issue Aug 11, 2017
…cess

Accesses to super properties are cached on 'this' object (vs. the
"super" object), causing conflict between e.g. super.x and this.x.
Similar conflicts cause Issue#3423 for GetProperty cases.
Fix by changing to object/propertyObject for caching super property
accesses.
chakrabot pushed a commit that referenced this issue Aug 11, 2017
…operty access

Merge pull request #3336 from suwc:build/suwc/Issue3064

Accesses to super properties are cached on 'this' object (vs. the
"super" object), causing conflict between e.g. super.x and this.x.
Similar conflicts cause Issue#3423 for GetProperty cases.
Fix by adding 'isSuper' flag to use appropriate object for caching.

Fixes #3064, Fixes #3423
@suwc suwc closed this as completed Aug 11, 2017
chakrabot pushed a commit that referenced this issue Aug 11, 2017
…n super property access

Merge pull request #3336 from suwc:build/suwc/Issue3064

Accesses to super properties are cached on 'this' object (vs. the
"super" object), causing conflict between e.g. super.x and this.x.
Similar conflicts cause Issue#3423 for GetProperty cases.
Fix by adding 'isSuper' flag to use appropriate object for caching.

Fixes #3064, Fixes #3423
chakrabot pushed a commit that referenced this issue Aug 11, 2017
…e conflicts in super property access

Merge pull request #3336 from suwc:build/suwc/Issue3064

Accesses to super properties are cached on 'this' object (vs. the
"super" object), causing conflict between e.g. super.x and this.x.
Similar conflicts cause Issue#3423 for GetProperty cases.
Fix by adding 'isSuper' flag to use appropriate object for caching.

Fixes #3064, Fixes #3423
agarwal-sandeep added a commit to agarwal-sandeep/ChakraCore that referenced this issue Oct 10, 2017
…g patterns.

Due to a bug in super property access we were reaching the code path where we had src2 on instrcution but didn't freed it before generating bailout. After the fix for issue chakra-core#3423/chakra-core#3064 went in 2b9da66 the bu no longer reproes but for previous branches I am putting a conservative fix to always free src2 if we have it and don't have src1. For RS4 we have a WI to add asserts to better track no. of surces on instruction and add checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants