#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)
Change History (5)
Changed 19 years ago by
Attachment: | sample1.tol added |
---|
comment:2 Changed 19 years ago by
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
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Sorry, I forgot to set status to FIXED
comment:4 Changed 18 years ago by
bug_file_loc: | → http://www.tol-project.org |
---|
sample for bug 417