Regression tests are added for the recently closed fuzzer bugs.

Related issues: #380, #1065, #1073, #1074, #1075, #1080, #1081, #1082, #1083

JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
This commit is contained in:
István Kádár 2016-07-08 14:30:50 +02:00
parent 97be8bfbc8
commit cea3a142ac
9 changed files with 213 additions and 0 deletions

View File

@ -0,0 +1,17 @@
// Copyright 2016 Samsung Electronics Co., Ltd.
// Copyright 2016 University of Szeged.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
new (new (new RegExp().constructor)().constructor)().constructor.prototype.toString()
RegExp().constructor().constructor.prototype.compile(RegExp.prototype)

View File

@ -0,0 +1,18 @@
// Copyright 2016 Samsung Electronics Co., Ltd.
// Copyright 2016 University of Szeged.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
try { String.prototype(new (RegExp)()) } catch($){}
try { RegExp.prototype.compile() } catch($){}
try { isNaN(RegExp.prototype.compile(RegExp.prototype)) } catch($){}

View File

@ -0,0 +1,22 @@
// Copyright 2016 Samsung Electronics Co., Ltd.
// Copyright 2016 University of Szeged.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
try { this.Date.prototype.$ (this.isNaN.length, this.String.fromCharCode.length) } catch($){}
try { this.String.prototype.constructor.prototype.$(new (this.RegExp)()) } catch($){}
try { this.RegExp.prototype.constructor.prototype.compile () } catch($){}
try { this.isNaN (undefined) } catch($){}
try { new (this.Date)("2015-09-17").constructor.parse() } catch($){}
try { this.isNaN(this.RegExp.prototype.compile(this.RegExp.prototype)) } catch($){}
try { new $.$ () } catch($){}

View File

@ -0,0 +1,18 @@
// Copyright 2016 Samsung Electronics Co., Ltd.
// Copyright 2016 University of Szeged.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
try { new (RegExp)().$() } catch($){}
try { RegExp.prototype.compile() } catch($){}
try { new (this.$)(1, RegExp.prototype.compile(RegExp.prototype)) } catch($){}

View File

@ -0,0 +1,19 @@
// Copyright 2016 Samsung Electronics Co., Ltd.
// Copyright 2016 University of Szeged.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
((new RegExp("}").constructor)("a", "g").constructor)(undefined).constructor.prototype.toString();
new Date("2015-07-09T12:13:14.121+01:30").toISOString();
RegExp(new RegExp("a", "g")).constructor("").constructor.prototype.compile(RegExp.prototype);
new Date("2015-09-17").getUTCFullYear();

View File

@ -0,0 +1,30 @@
// Copyright 2016 Samsung Electronics Co., Ltd.
// Copyright 2016 University of Szeged.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
try { new RegExp().compile(A) } catch (err) {}
try { A } catch (err) {}
try { new RegExp().constructor.prototype.toString() } catch (A) {}
try { A } catch (err) {}
try { new RegExp(1, "g").exec(1) } catch (A) {}
try { A } catch (err) {}
try { A } catch (A) {}
try { A } catch (A) {}
try { new (Boolean.constructor.prototype) } catch (err) {}
try { Boolean } catch (A) {}
try { A } catch(A) {}
try { new RegExp().compile(new (RegExp)()) } catch (A) {}
try { Math.max().constructor.seal(A) } catch (err) {}
try { Date.parse(RegExp.prototype.compile(RegExp.prototype)) } catch(A) {}
try { Boolean.A() } catch (err) {}

View File

@ -0,0 +1,39 @@
// Copyright 2016 Samsung Electronics Co., Ltd.
// Copyright 2016 University of Szeged.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
try { new (String)().A.A.A (A) } catch (A) {}
try { new (this.RegExp)().A () } catch (A) {}
try { A.A.A () } catch (A) {}
try { ; } catch (A) {}
try { new A.A () } catch (A) {}
try { new (this.Date)().setMinutes (this.RegExp.prototype) } catch (A) {}
try { ; } catch (A) {}
try { ; } catch (A) {}
try { new A.A (A) } catch (A) {}
try { this.A (A) } catch (A) {}
try { new A.A () } catch (A) {}
try { ; } catch (A) {}
try { ; } catch (A) {}
try { ; } catch (A) {}
try { ; } catch (A) {}
try { ; } catch (A) {}
try { ; } catch (A) {}
try { ; } catch (A) {}
try { ; } catch (A) {}
try { new A().A () } catch (A) {}
try { new A().A () } catch (A) {}
try { this.isNaN (this.RegExp.prototype.compile (this.RegExp.prototype)) } catch (A) {}
try { ; } catch (A) {}
try { A.A.A (A) } catch (A) {}

View File

@ -0,0 +1,32 @@
// Copyright 2016 Samsung Electronics Co., Ltd.
// Copyright 2016 University of Szeged.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
try { ; } catch (A) {}
try { new (this.String)().A.A.A (A) } catch (A) {}
try { ; } catch (A) {}
try { new (this.RegExp)().A () } catch (A) {}
try { A.A.A () } catch (A) {}
try { } catch (A) {}
try { ; } catch (A) {}
try { ; } catch (A) {}
try { ; } catch (A) {}
try { ; } catch (A) {}
try { new A.A () } catch (A) {}
try { new (this.Date)().setMinutes (this.RegExp.prototype) } catch (A) {}
try { this.A (A) } catch (A) {}
try { new A.A () } catch (A) {}
try { this.isNaN (this.RegExp.prototype.compile (this.RegExp.prototype)) } catch (A) {}
try { ; } catch (A) {}
try { A.A.A(A) } catch (A) {}

View File

@ -0,0 +1,18 @@
// Copyright 2016 Samsung Electronics Co., Ltd.
// Copyright 2016 University of Szeged.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
var v_0 = [];
var v_1 = [['\u200E', '\u0601', '\u0602', '\u0603', '\u06DD', '\u070F'],[0x1107, 0x1175, 0x11B0]];
v_0[v_1];