Date: Wed, 21 Oct 1998 15:36:51 +0200 (SAT) From: John Hay <jhay@mikom.csir.co.za> To: syssgm@dtir.qld.gov.au (Stephen McKay) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: 3.0-R on a amd386dx/40 Message-ID: <199810211336.PAA07535@zibbi.mikom.csir.co.za> In-Reply-To: <199810211020.UAA09162@nymph.dtir.qld.gov.au> from Stephen McKay at "Oct 21, 98 08:20:59 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
> >> Try "awk", for example. It uses floating point, and I think it will die. > >> "df" uses double. "newfs" uses float. "ls" doesn't, and it works. It's > >> a floating point problem, or I'll eat my copy of the Pointy Hat! > >> > >> I still think the "npx" lines from boot are relevant. > > > >ok, here are the lines: > >npx0 on motherboard > >npx0: 387 emulator Ok, here is what I have found so far. I used a 3.0 system with a new kernel with Peter Wemm's commits to i386/math_emulate.c. Then I recompiled libc.a with vfprintf.c with debugging on and then also compiled fsck with debugging on and got it to dump core on a 386 machine. Here is some of gdb's output. What is interesting is that the coredump address (0x806859f) falls between two assembler instructions... or did disassem get it wrong? Or am I confused? Is it possible that the emulator in the kernel restarts the program at the wrong place? John -- John Hay -- John.Hay@mikom.csir.co.za ----------------- Core was generated by `fsck'. Program terminated with signal 10, Bus error. #0 0x806859f in cvt (value=5.2716105037754986, ndigits=1, flags=256, sign=0xefbfd9fb "", decpt=0xefbfd9f4, ch=102, length=0xefbfd9f0) at /usr/src/lib/libc/../libc/stdio/vfprintf.c:1219 1219 if (value < 0) { (gdb) bt #0 0x806859f in cvt (value=5.2716105037754986, ndigits=1, flags=256, sign=0xefbfd9fb "", decpt=0xefbfd9f4, ch=102, length=0xefbfd9f0) at /usr/src/lib/libc/../libc/stdio/vfprintf.c:1219 #1 0x8066a5e in vfprintf (fp=0x80765bc, fmt0=0x80712c7 "(%d frags, %d blocks, %.1f%% fragmentation)\n", ap=0xefbfdc00 "\t\024\a\b\e\021") at /usr/src/lib/libc/../libc/stdio/vfprintf.c:608 #2 0x805e488 in printf () #3 0x804acef in checkfilesys (filesys=0x8076714 "/dev/rwd0s1e", mntpt=0x0, auxdata=0, child=0) at main.c:271 #4 0x804a9e1 in main (argc=2, argv=0xefbfdde0) at main.c:136 #5 0x80480c9 in _start () (gdb) list 1214 */ 1215 if (ch == 'e' || ch == 'E') 1216 ndigits++; 1217 mode = 2; /* ndigits significant digits */ 1218 } 1219 if (value < 0) { 1220 value = -value; 1221 *sign = '-'; 1222 } else 1223 *sign = '\000'; (gdb) disassem Dump of assembler code for function cvt: 0x8068568 <cvt>: pushl %ebp 0x8068569 <cvt+1>: movl %esp,%ebp 0x806856b <cvt+3>: subl $0x8,%esp 0x806856e <cvt+6>: pushl %edi 0x806856f <cvt+7>: pushl %esi 0x8068570 <cvt+8>: pushl %ebx 0x8068571 <cvt+9>: movl 0x18(%ebp),%ecx 0x8068574 <cvt+12>: movl 0x20(%ebp),%esi 0x8068577 <cvt+15>: cmpl $0x66,%esi 0x806857a <cvt+18>: jne 0x8068584 <cvt+28> 0x806857c <cvt+20>: movl $0x3,%edx 0x8068581 <cvt+25>: jmp 0x8068596 <cvt+46> 0x8068583 <cvt+27>: nop 0x8068584 <cvt+28>: cmpl $0x65,%esi 0x8068587 <cvt+31>: je 0x806858e <cvt+38> 0x8068589 <cvt+33>: cmpl $0x45,%esi 0x806858c <cvt+36>: jne 0x8068591 <cvt+41> 0x806858e <cvt+38>: incl 0x10(%ebp) 0x8068591 <cvt+41>: movl $0x2,%edx 0x8068596 <cvt+46>: fldz 0x8068598 <cvt+48>: fcompl 0x8(%ebp) 0x806859b <cvt+51>: fnstsw 0x806859e <cvt+54>: andb $0x45,%ah 0x80685a1 <cvt+57>: jne 0x80685b0 <cvt+72> 0x80685a3 <cvt+59>: fldl 0x8(%ebp) 0x80685a6 <cvt+62>: fchs 0x80685a8 <cvt+64>: fstpl 0x8(%ebp) 0x80685ab <cvt+67>: movb $0x2d,(%ecx) 0x80685ae <cvt+70>: jmp 0x80685b3 <cvt+75> 0x80685b0 <cvt+72>: movb $0x0,(%ecx) 0x80685b3 <cvt+75>: leal 0xfffffff8(%ebp),%eax 0x80685b6 <cvt+78>: pushl %eax 0x80685b7 <cvt+79>: leal 0xfffffffc(%ebp),%eax 0x80685ba <cvt+82>: pushl %eax 0x80685bb <cvt+83>: pushl 0x1c(%ebp) 0x80685be <cvt+86>: pushl 0x10(%ebp) ... ----------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810211336.PAA07535>