[Aldor-l] Fwd: Aldor Compiler

Pippijn van Steenhoven pip88nl at gmail.com
Mon Dec 10 07:36:51 EST 2007


Hello mailing list,

I have a few questions and asked them to the people I thought would
know, but then I found out about the mailing list and figured, I could
ask there, as well. Here are the two messages I wrote.


---------- Forwarded message ----------
From: Pippijn van Steenhoven <pip88nl at gmail.com>
Date: Dec 8, 2007 11:22 PM
Subject: Aldor Compiler
To: ldragan at scl.csd.uwo.ca


Hello Laurentiu Dragan,

recently, I have started looking into the Aldor compiler, runtime and library.
While reading the code I spotted several awkward areas. Specifically, I feel
that a function that tests for equality should not change the value of its
arguments. This is the case for "Bool symeEqual (Syme syme1, Syme syme2)" and
"Bool tformEqual (TForm tf1, TForm tf2)".

I am interested in Aldor and compiler development but I would like to know
what this is supposed to mean.

Regards,
Pippijn

---------- Second message ----------

Hello Aldor compiler developers,

I am having issues with the Aldor compiler. When I compile runtime.as
without optimisations, I get obscure segmentation faults within
runtime.as (or runtime.c). When I do compile it with optimisation and
I run the axllib testsuite, there are also several segmentation faults
in different tests.

This is all the information I can quickly get from the crashed app
when compiling without optimisations and running a program that
outputs "Hello" to stdout:

Program received signal SIGSEGV, Segmentation fault.
0x00002abc503ec15b in CF0_runtime (e1=0x0) at
/home/pippijn/rona/library/foam/runtime.c:1690
1690            l0->X87_Pointer = fiCCall2(FiWord, G_KK8CX_rtLazyDomFrInit, T9,
(gdb) l
1685            G_30VT8_stdGetWordWordRetNOp2 = fiClosMake(e0,
C290_lazyFnGetter);
1686            G_7SHFP_stdGetWordWordWordRetC = fiClosMake(e0,
C288_lazyFnGetter);
1687            G_DBH3Z_stdGetWordWordWordRetN = fiClosMake(e0,
C286_lazyFnGetter);
1688            G_B830W_stdGetWordWordWordRetW = fiClosMake(e0,
C284_lazyFnGetter);
1689            G_DBH41_stdGetWordWordWordRetN = fiClosMake(e0,
C282_lazyFnGetter);
1690            l0->X87_Pointer = fiCCall2(FiWord, G_KK8CX_rtLazyDomFrInit, T9,
1691                    0L);
1692            l0->X66_Value = l0->X87_Pointer;
1693            l0->X95_OutFile = fiCCall2(FiWord, G_KK8CX_rtLazyDomFrInit, T10,
1694                    0L);
(gdb) bt
#0  0x00002abc503ec15b in CF0_runtime (e1=0x0) at
/home/pippijn/rona/library/foam/runtime.c:1690
#1  0x0000000000400db8 in CF0_out ()
#2  0x0000000000400ce3 in main ()
(gdb) bt full
#0  0x00002abc503ec15b in CF0_runtime (e1=0x0) at
/home/pippijn/rona/library/foam/runtime.c:1690
       T22 = (FiWord *) 0x8
       T24 = (FiWord *) 0x100950003
       T26 = (FiWord *) 0x8
       T29 = 1
       T0_dStep = (FiClos) 0x62a6a0
       T1_dCall = (FiClos) 0x62a240
       T2_dCatch = (FiClos) 0x62a7f0
       T3_dThrow = (FiClos) 0x62a720
       T4_dAssign = (FiClos) 0x62a560
       T5_dExit = (FiClos) 0x62a350
       T6_dReturn = (FiClos) 0x62a1a0
       T7_dInit = (FiClos) 0x62a570
       T8_dEnter = (FiClos) 0x62a750
       T9 = (FiClos) 0x62a3c0
       T10 = (FiClos) 0x62a3f0
       T11 = (FiClos) 0x62a410
       T12 = (FiClos) 0x62a5d0
       T13 = (FiClos) 0x62a4a0
       T14 = (FiClos) 0x62a610
       T15 = (FiClos) 0x62a270
       T16 = (FiClos) 0x62a5b0
       T17 = (FiClos) 0x62a530
       T18 = (FiClos) 0x62a1d0
       T19 = (FiClos) 0x62a540
       T20 = (FiClos) 0x62a4e0
       T21 = (FiClos) 0x62aad0
       T28 = (FiClos) 0x62a260
       T23 = (PFmt25) 0x7fff5b656bf0
       T25 = (PFmt25) 0x2abc4f95af68
       T27 = (PFmt25) 0x0
       l0 = (PFmt51) 0x62f920
       e0 = (FiEnv) 0x634718
#1  0x0000000000400db8 in CF0_out ()
No symbol table info available.
#2  0x0000000000400ce3 in main ()
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
(gdb) p G_KK8CX_rtLazyDomFrInit
$1 = (FiClos) 0x0
(gdb) p T9
$2 = (FiClos) 0x62a3c0
(gdb) p *T9
$3 = {env = 0x634718, prog = 0x2abc5060cf00}
(gdb) p *T9->prog
$4 = {fun = 0x2abc504037fb <CF330_pointer_MINUS_init>, fcall = 0,
progInfo = 0, data = 0}
(gdb) p *T9->env
$5 = {level = 0x62f920 " ¡b", next = 0x0, info = 0}
(gdb)

This is from an optimised library and an optimised test program from
the test suite (object1.as):
Starting program: /home/pippijn/rona/test/axllib/object1.run

Program received signal SIGSEGV, Segmentation fault.
0x00002b0f6d47f83c in CF63_domainHash_BANG_ (e1=0x6346a0,
P0_td=47345250981332) at
/home/pippijn/rona/library/foam/runtime.c:5759
5759            T0 = ((PFmt20) ((PFmt11) P0_td)->X0_dispatcher)->X4_hasher;
(gdb) l
5754
5755    static FiWord
5756    CF63_domainHash_BANG_(FiEnv e1, FiWord P0_td)
5757    {
5758            FiClos T0;
5759            T0 = ((PFmt20) ((PFmt11) P0_td)->X0_dispatcher)->X4_hasher;
5760            return fiCCall1(FiWord, T0, ((PFmt11) P0_td)->X1_domainRep);
5761    }
5762
5763    static struct _FiProg  tmp63_domainHash_BANG_ = {
(gdb) p P0_td
$1 = 47345250981332
(gdb) p *P0_td
$2 = 100329
(gdb) p ((PFmt20) ((PFmt11) P0_td)->X0_dispatcher)->X4_hasher
Cannot access memory at address 0x458b480000018809
(gdb) p ((PFmt20) ((PFmt11) P0_td)->X0_dispatcher)
$3 = (struct Fmt20 *) 0x458b4800000187e9
(gdb) bt
#0  0x00002b0f6d47f83c in CF63_domainHash_BANG_ (e1=0x6346a0,
P0_td=47345250981332) at
/home/pippijn/rona/library/foam/runtime.c:5759
#1  0x0000000000401a19 in CF1_f (e1=0x634688) at object1.c:283
#2  0x00000000004015c4 in CF0_object1 (e1=0x0) at object1.c:203
#3  0x0000000000401163 in main (argc=1, argv=0x7fff3e29fa78) at aldormain.c:22
(gdb) bt full
#0  0x00002b0f6d47f83c in CF63_domainHash_BANG_ (e1=0x6346a0,
P0_td=47345250981332) at
/home/pippijn/rona/library/foam/runtime.c:5759
       T0 = (FiClos) 0x6292e0
#1  0x0000000000401a19 in CF1_f (e1=0x634688) at object1.c:283
       T0_S = 47345250981332
       T1 = (FiWord *) 0x629160
       T5 = 40
       T9 = 6506624
       T10 = 82
       T11 = 16
       T12 = 6516736
       T13 = 6517664
       T17 = 6516736
       T21 = 40
       T26 = 16
       T30 = 730150957984
       T33 = 6478336
       T35 = 6517856
       T37 = 6478464
       T39 = 6478592
       T41 = 6478528
       T43 = 6478400
       T47 = 70545954260
       T51 = 6526000
       T52 = 6517984
       T69 = 6517728
       T70 = 44
       T71 = 16
       T72 = 6506384
       T73_T = 16
       T76_0 = 6516736
       T79_0 = 6517728
       T80_l = 6516736
       T81_l = 44
       T88 = 6517728
       T54 = 0
       T55 = 0
---Type <return> to continue, or q <return> to quit---
       T86 = 731187377936
       T87 = 6459696
       T83 = 140734236325648
       T84 = 6459744
       T85 = 0
       T82_double = 0.40000000000000002
       T2 = (FiClos) 0x1000634898
       T3 = (FiClos) 0x10
       T4 = (FiClos) 0x6373b0
       T6 = (FiClos) 0xaa00000010
       T7 = (FiClos) 0x6373a0
       T8 = (FiClos) 0xaa3e29f5d0
       T14 = (FiClos) 0x10
       T15 = (FiClos) 0xaa00637360
       T16 = (FiClos) 0x10
       T18 = (FiClos) 0x24
       T19 = (FiClos) 0x637000
       T20 = (FiClos) 0x637360
       T23 = (FiClos) 0x637000
       T24 = (FiClos) 0x10
       T25 = (FiClos) 0x637000
       T27 = (FiClos) 0x10
       T28 = (FiClos) 0x24
       T29 = (FiClos) 0x637360
       T44 = (FiClos) 0x2b0f6cddd5d4
       T45 = (FiClos) 0x7fff3e29f5b0
       T46 = (FiClos) 0x106cddd5d4
       T48 = (FiClos) 0x639400
       T49 = (FiClos) 0x639410
       T50 = (FiClos) 0x639420
       T74__LT__LT_ = (FiClos) 0x7fff3e29f790
       T75__GT_ = (FiClos) 0x2b0f6cddd5d4
       T77__LT__LT_ = (FiClos) 0x629130
       T78__GT_ = (FiClos) 0x3
       T22 = 0x1b <Address 0x1b out of bounds>
       T57 = 0x3 <Address 0x3 out of bounds>
---Type <return> to continue, or q <return> to quit---
       T59 = 0x5 <Address 0x5 out of bounds>
       T60 = 0x7 <Address 0x7 out of bounds>
       T61 = 0x629130 "\001"
       T63 = 0x629000 "\001"
       T64 = 0x3 <Address 0x3 out of bounds>
       T65 = 0x629130 "\001"
       T66 = 0x629130 "\001"
       T67 = 0x5 <Address 0x5 out of bounds>
       T68 = 0x7 <Address 0x7 out of bounds>
       T56 = (PFmt20) 0x637470
       T58 = (PFmt20) 0x637470
       T62 = (PFmt20) 0x2b0f6cd0ff14
       T53 = (PFmt14) 0x6374e0
       T32 = (PFmt17) 0x6373f0
       T34 = (PFmt17) 0x637480
       T36 = (PFmt17) 0x637410
       T38 = (PFmt17) 0x637430
       T40 = (PFmt17) 0x637420
       T42 = (PFmt17) 0x637400
       T31 = (PFmt18) 0x635208
       l1 = (PFmt11) 0x62e080
#2  0x00000000004015c4 in CF0_object1 (e1=0x0) at object1.c:203
       T7 = 6478640
       T0 = (FiClos) 0x62d960
       T1 = (FiClos) 0x62d970
       T2 = (FiClos) 0x62d980
       T3 = (FiClos) 0x62d990
       T4 = (FiClos) 0x62d9a0
       T5 = (FiClos) 0x62d9b0
       T6 = (FiClos) 0x62d9c0
       l0 = (PFmt11) 0x62e080
       e0 = (FiEnv) 0x634688
#3  0x0000000000401163 in main (argc=1, argv=0x7fff3e29fa78) at aldormain.c:22
       frobnitz = {tag = 8029399166113284096, next = 0x0, target = 73, value
= 0, nStates = 1, states = 0x6351f0, machineState = {{
     __jmpbuf = {47345247075328, -543869742135247340, 0,
140734236326512, 0, 0, -543869742198161900, 544290734539275796},
     __mask_was_saved = 0, __saved_mask = {__val = {820338753536,
3221252723567493121, 0, 0, 1970169159, 10, 32768, 1,
---Type <return> to continue, or q <return> to quit---
         47345247075328, 0, 4197907, 47345266214784, 4207829,
140734236326520, 47345247075328, 4207760}}}}}
       state = (FiState) 0x7fff3e29f880
       flag = 0
       var = 140734236326512
(gdb)

Regards,
Pippijn van Steenhoven


More information about the Aldor-l mailing list