View Issue Details

IDProjectCategoryView StatusLast Update
0038043pas2jstranspilerpublic2020-11-26 13:55
Reporterhenrique Assigned ToMattias Gaertner  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformPas2JsOSWindows 
Summary0038043: Access violation with optimization -O2
DescriptionThe project I attached gives an access violation error when compiled.

Apparently the error occurs because a TJSCallExpression internal variable has not been initialized.

With that I also attached the correction I made to stop the error.
TagsNo tags attached.
Fixed in Revision47335.
Attached Files

Activities

henrique

2020-11-05 15:20

reporter  

Error.zip (545 bytes)
JSCallExpression.patch (960 bytes)   
From 1a4065c8bcabf7e0706ab6075a441470ee9e95b0 Mon Sep 17 00:00:00 2001
From: Henrique Gottardi Werlang <henriquewerlang@hotmail.com>
Date: Thu, 5 Nov 2020 11:19:43 -0300
Subject: [PATCH] =?UTF-8?q?Erro=20e=20AV=20com=20as=20otimiza=C3=A7=C3=B5e?=
 =?UTF-8?q?s=20no=20m=C3=A1ximo.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 packages/fcl-js/src/jstree.pp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/packages/fcl-js/src/jstree.pp b/packages/fcl-js/src/jstree.pp
index 935dd395d3..96bace2343 100644
--- a/packages/fcl-js/src/jstree.pp
+++ b/packages/fcl-js/src/jstree.pp
@@ -1703,6 +1703,9 @@ procedure TJSCallExpression.InsertArg(Index: integer; El: TJSElement);
 var
   NewEl: TJSArrayLiteralElement;
 begin
+  //if Args=nil then
+    //Args:=TJSArguments.Create(Line,Column,Source);
+
   NewEl:=TJSArrayLiteralElement(Args.Elements.Insert(Index));
   NewEl.Expr:=El;
 end;
-- 
2.29.2.windows.1

JSCallExpression.patch (960 bytes)   

Issue History

Date Modified Username Field Change
2020-11-05 15:20 henrique New Issue
2020-11-05 15:20 henrique File Added: Error.zip
2020-11-05 15:20 henrique File Added: JSCallExpression.patch
2020-11-05 16:04 Michael Van Canneyt Assigned To => Mattias Gaertner
2020-11-05 16:04 Michael Van Canneyt Status new => assigned
2020-11-07 12:05 Mattias Gaertner Status assigned => resolved
2020-11-07 12:05 Mattias Gaertner Resolution open => fixed
2020-11-07 12:05 Mattias Gaertner Fixed in Revision => 47335.