9fans archive / 1994 / 08 / 9 /    prev next

From: Hans-Peter Bischof bischof@fri...
Subject: Alef & par
Date: Thu, 25 Aug 1994 08:04:36 -0400


Dear Plan 9 fan,

I have some trouble with alef's
par control statement.

Everything works fine
with two statements in the par block.

The program core dumpes, if there are
more statements in the par block.

Can you help me?

Hans-Peter

-----------------------------------------------

The source code, an example for a execution of the program,
some 'ps | grep par_test' lines, and some debugger information
follows.


The source:
--------------------
/* par_test.l                                           */
#include <alef.h>
void main(void)
{
int index;

        print("pid = %d\n", getpid());
        for ( index = 0; index < 200; index ++ )
        {
                par 
                {       print("@");
                        print("#");
                        print("X");
                }
        }
}

Execution:
--------------------
term% file p*t
par_test: sparc plan 9 executable
term% par_test
pid = 1899
@par_test 1901: suicide: sys: trap: fault write addr=0xfffffff8 pc=0x10f0
X

	Where is prozess with the pid 1900?


Ps info:
--------------------
term% ps -aux | grep par_test
none       1899    1:10   0:00    76K Ready    par_test		# cpu
none       1901    0:00   0:00    76K Broken   par_test
term%  ps -aux | grep par_test
none       1899    1:18   0:00    76K Ready    par_test		# time grows
none       1901    0:00   0:00    76K Broken   par_test

Debugger:
--------------------
term% db 1901
sparc binary
last exception: data access exception
par_2.l:12 main+#d0?             MOVW   R10, #4(R8)
$c
main() /sys/include/alef/alef.h:250 called from ALEF_linksp+#10 alefasm.s:12
ALEF_linksp() alefasm.s:6 called from ALEF_pfork+#54 alef.l:2
ALEF_pfork(n=#0, stack=#0) alef.l:796 called from #fffffff8 
1

Thanks for reading und thinking.