summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Delamarre <cedric.delamarre@scilab-enterprises.com>2016-11-02 17:38:57 +0100
committerAntoine ELIAS <antoine.elias@scilab-enterprises.com>2016-11-04 11:09:06 +0100
commit3fbcac9fad80560cfda7ed5ed9fa31441ea1d9f2 (patch)
treeeaed8091f8d329d68a9da06cfadfc374530cc456
parent82e22069e9e6bc12e23c5ad0a2aed4c2ae6f53a5 (diff)
downloadscilab-3fbcac9fad80560cfda7ed5ed9fa31441ea1d9f2.zip
scilab-3fbcac9fad80560cfda7ed5ed9fa31441ea1d9f2.tar.gz
[bug_14411] while loop fixed when using ctrl-C then abort
double free of the constExp ie: while 1 Change-Id: Ie0cd297c03aecb4450df6301f9e8409fc3bd4dc3
-rw-r--r--scilab/CHANGES.md1
-rw-r--r--scilab/modules/ast/src/cpp/ast/runvisitor.cpp2
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_14411.tst24
3 files changed, 27 insertions, 0 deletions
diff --git a/scilab/CHANGES.md b/scilab/CHANGES.md
index fdf8b43..486a23e 100644
--- a/scilab/CHANGES.md
+++ b/scilab/CHANGES.md
@@ -345,6 +345,7 @@ Bug Fixes
345* [#14367](http://bugzilla.scilab.org/show_bug.cgi?id=14367): `edit_curv` failed opening due to a `[]+1` operation. 345* [#14367](http://bugzilla.scilab.org/show_bug.cgi?id=14367): `edit_curv` failed opening due to a `[]+1` operation.
346* [#14379](http://bugzilla.scilab.org/show_bug.cgi?id=14379): Problem with lists of functions having 2 arguments. 346* [#14379](http://bugzilla.scilab.org/show_bug.cgi?id=14379): Problem with lists of functions having 2 arguments.
347* [#14395](http://bugzilla.scilab.org/show_bug.cgi?id=14395): `dir` displayed a []+".." warning when no subdirectory exists. 347* [#14395](http://bugzilla.scilab.org/show_bug.cgi?id=14395): `dir` displayed a []+".." warning when no subdirectory exists.
348* [#14411](http://bugzilla.scilab.org/show_bug.cgi?id=14411): abort crashes scilab in a loop while
348* [#14448](http://bugzilla.scilab.org/show_bug.cgi?id=14448): removed havewindow() was still documented 349* [#14448](http://bugzilla.scilab.org/show_bug.cgi?id=14448): removed havewindow() was still documented
349* [#14461](http://bugzilla.scilab.org/show_bug.cgi?id=14461): Calling `grand(n, "markov", P, x0)` did not return all outputs. 350* [#14461](http://bugzilla.scilab.org/show_bug.cgi?id=14461): Calling `grand(n, "markov", P, x0)` did not return all outputs.
350* [#14513](http://bugzilla.scilab.org/show_bug.cgi?id=14513): `isqual` comparing two built-in functions yielded an error. 351* [#14513](http://bugzilla.scilab.org/show_bug.cgi?id=14513): `isqual` comparing two built-in functions yielded an error.
diff --git a/scilab/modules/ast/src/cpp/ast/runvisitor.cpp b/scilab/modules/ast/src/cpp/ast/runvisitor.cpp
index 2dd363f..793fe64 100644
--- a/scilab/modules/ast/src/cpp/ast/runvisitor.cpp
+++ b/scilab/modules/ast/src/cpp/ast/runvisitor.cpp
@@ -585,6 +585,8 @@ void RunVisitorT<T>::visitprivate(const WhileExp &e)
585 while (pIT->isTrue()) 585 while (pIT->isTrue())
586 { 586 {
587 pIT->killMe(); 587 pIT->killMe();
588 setResult(NULL);
589
588 try 590 try
589 { 591 {
590 e.getBody().accept(*this); 592 e.getBody().accept(*this);
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_14411.tst b/scilab/modules/ast/tests/nonreg_tests/bug_14411.tst
new file mode 100644
index 0000000..9951a9d
--- /dev/null
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_14411.tst
@@ -0,0 +1,24 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2016 - Scilab Enterprises - Cedric Delamarre
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- CLI SHELL MODE -->
8// <-- INTERACTIVE TEST -->
9//
10// <-- Non-regression test for bug 14411 -->
11//
12// <-- Bugzilla URL -->
13// http://bugzilla.scilab.org/14411
14//
15// <-- Short Description -->
16// abort crashes scilab in a loop while
17
18// execute in scilab
19while 1
20 a=1
21end
22
23// then ctrl-C to break the loop
24// scilab must not crashes after axecution of "abort"