TRAP B (Segment not present) in SCO Xenix 386 2.2.3.
Carlos Mendioroz
tron at mrecvax.UUCP
Sat Nov 19 07:46:10 AEST 1988
Be carefull with wrong passing parameters to a routine, especially
when pointers are involved.
The following code, compiled in a 286 machine with -M2l option
causes a 386 machine to crash with a panic!
main()
{
int a, b;
a = 0x47;
b = 0x33;
strlen(a, b);
}
This kind of things can happen if you change the order of the
parameters of a call, such as:
short a;
char *b, *c;
...
foo(a, b, c)
...
foo(x, y, z)
char *x, *y;
short z;
{
...
strlen(x);
...
}
--
Carlos G. Mendioroz <tron at mrecvax.mrec.ar>
Work: +54 (1) 313-8082 Fax: +54 (1) 311-1249
Home: +54 (1) 71-3473 ; Malabia 2659 11 B, Buenos Aires, 1425 ARGENTINA
More information about the Comp.unix.xenix
mailing list