close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#417 closed defect (fixed)

segmentation fault

Reported by: Jorge Owned by: Víctor de Buen Remiro
Priority: normal Milestone:
Component: Kernel Version: head
Severity: normal Keywords:
Cc:

Description

Try the code attached, sample1.tol

The code in sample1.tol redefine a variable with name 'reg'.

Follow the steps:

1- Open the file in tolbase

2- Compile: tol will complain about variable name 'reg'

3- Decompile the file.

4- Edit the file and change the name of the variables 'reg' so they have
different names: reg1, reg2.

5- Compile again: should crash.

Attachments (1)

sample1.tol (366 bytes) - added by Jorge 19 years ago.
sample for bug 417

Download all attachments as: .zip

Change History (5)

Changed 19 years ago by Jorge

Attachment: sample1.tol added

sample for bug 417

comment:1 Changed 19 years ago by Víctor de Buen Remiro

Status: newassigned

thamks to report it

comment:2 Changed 19 years ago by Víctor de Buen Remiro

Sorry, I cannot reproduce this bug for your code

/Set sX = "diag", 1, 2, 3, 4?;
Matrix y = Col(1,1,1,1);
Set reg = SparseLinearRegression("", y, sX);
Set vreg = View(reg , "Std");
Set reg1 = SparseLinearRegression("ALL", y, sX);
Set reg2 = SparseLinearRegression("BETA:SAMPLE=100,1", y, sX);
Matrix X = ((1,0,0,0),

(0,2,0,0),
(0,0,3,0),
(0,0,0,4));

Set reg_Dense =LinReg(y, X);
/

First running all works fine and shows this standard output:

/
beta=1.000000;
0.500000;
0.333333;
0.250000;

MSE=0.000000
F=1.000000; 0.000000; 0.000000; 0.000000;
0.000000; 0.500000; 0.000000; 0.000000;
0.000000; 0.000000; 0.333333; 0.000000;
0.000000; 0.000000; 0.000000; 0.250000;
Initialized mt19937 with seed = 1869523855 using mt19937_1998(2392034514)

Warning: [1] No se puede usar una distribucion t-Student con parametros (0)
Ha sido incluído el fichero C:/users/vdebuen/bsd/entity/PrjTest/source/bug/bug_417/test.tol [0 sec.]
/

When I change reg variable by reg1 then an error is reported because reg1 is attempted to be created afterwards

/Set sX = "diag", 1, 2, 3, 4?;
Matrix y = Col(1,1,1,1);
Set reg1 = SparseLinearRegression("", y, sX);
Set vreg = View(reg1, "Std");
Set reg1 = SparseLinearRegression("ALL", y, sX);
Set reg2 = SparseLinearRegression("BETA:SAMPLE=100,1", y, sX);
Matrix X = ((1,0,0,0),

(0,2,0,0),
(0,0,3,0),
(0,0,0,4));

Set reg_Dense =LinReg(y, X);
/

Shows this standard output:
/
beta=1.000000;
0.500000;
0.333333;
0.250000;

MSE=0.000000
F=1.000000; 0.000000; 0.000000; 0.000000;
0.000000; 0.500000; 0.000000; 0.000000;
0.000000; 0.000000; 0.333333; 0.000000;
0.000000; 0.000000; 0.000000; 0.250000;

ERROR: [1] Variable 'reg2' ya definida en el fichero C:/users/vdebuen/bsd/entity/PrjTest/source/bug/bug_417/test.tol
No se ha podido crear la variable "Set reg2".

ERROR: [2] Conflicto entre variables.
Se ha intentado modificar "reg2" a través de la variable "reg2"

Warning: [2] No se puede usar una distribucion t-Student con parametros (0)
Ha sido incluído el fichero C:/users/vdebuen/bsd/entity/PrjTest/source/bug/bug_417/test.tol [0 sec.]
/

but TOL doesn't crash

Probably I didn't understand tyour instructions.

comment:3 Changed 19 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: assignedclosed

Sorry, I forgot to set status to FIXED

comment:4 Changed 18 years ago by Víctor de Buen Remiro

bug_file_loc: http://www.tol-project.org
Note: See TracTickets for help on using tickets.