Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Native build failure...



Michael L. Hitch wrote:
On Mon, 26 Jul 2010, Matt Thomas wrote:

If I read things right, it's one of these two lines wich cause the segfault though:
   ce1:       c8 50 ad d8     bisl2 r0,0xffffffd8(fp)
   ce5:       e8 a6 0d 05     blbs 0xd(r6),cee <update_file+0x428>
...
blbs uses a longword access so if r6+0xd is at 0xffd..0xfff and the page following isn't mapped you will get a segfault.
Yes, but my first guess is that it would be the bisl2 instruction. The address (if my conversions are right) would point to pc pointing at the blbs after the trap, and I assume the pc have been updated at that point?
But I might be totally messing up my address calculations as well...

 I think Matt want's the VA that caused the fault, which would likely
be the contents of R6 + 0xd. I have a rather vague memory of something similar where the target address of the blbs was indexed with a non-multiple-of-four offset which caused a memory fault. The same rather vague memory seems to recall that Matt came up with a code generation change that did the blbs differently if the indexed offset was not a multiple of 4. A -g build could hide the problem by re-arranging the code such that the test is done differently, or the data re-arranged so that the 4 bytes at (r6) are valid.

But that was for extzv and inszv but not blb[sc]. Basically for unaligned displacements, use bb[sc] instead. Shouldn't be that hard to code up.

The memory may be vague, but searching my mail finds what I remember, and it was blbs:

http://mail-index.NetBSD.org/port-vax/2009/05/28/msg000691.html

  I don't know if there was any followup to that message though.

Interesting. And that might be relevant...

Anyway, after some more fiddling, I managed to get gdb to give a lot more useful information...

(gdb) core nbgmake.core
Reading symbols from /usr/lib/libc.so.12...done.
Breakpoint 1 at 0x7f78a51d
Breakpoint 2 at 0x7f79efa5
Loaded symbols for /usr/lib/libc.so.12
Reading symbols from /usr/libexec/ld.elf_so...done.
Loaded symbols for /usr/libexec/ld.elf_so
Core was generated by `nbgmake'.
Program terminated with signal 11, Segmentation fault.
#0  update_file (file=0x7f44b6a0, depth=18, 2135209632, 18)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:464
464           if (! d->ignore_mtime)
(gdb) bt
#0  update_file (file=0x7f44b6a0, depth=18, 2135209632, 18)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:464
#1  0x0002150a in check_dep (file=<value optimized out>, depth=18,
    this_mtime=1279970249,
    must_make_ptr=0x7fff9bac, 2135209632, 17, 1279970249, 0, 2147457964)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:857
#2  0x00020b8d in update_file (file=0x7f59ff10, depth=16, 2136604432, 16)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:463
#3  0x0002150a in check_dep (file=<value optimized out>, depth=16,
    this_mtime=1279970274,
    must_make_ptr=0x7fff9c5c, 2136604432, 15, 1279970274, 0, 2147458140)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:857
#4  0x00020b8d in update_file (file=0x7f570240, depth=14, 2136408640, 14)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:463
#5  0x0002150a in check_dep (file=<value optimized out>, depth=14,
    this_mtime=1279970283,
    must_make_ptr=0x7fff9d0c, 2136408640, 13, 1279970283, 0, 2147458316)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:857
#6  0x00020b8d in update_file (file=0x7f570290, depth=12, 2136408720, 12)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:463
#7  0x0002150a in check_dep (file=<value optimized out>, depth=12,
    this_mtime=1279970284,
    must_make_ptr=0x7fff9dbc, 2136408720, 11, 1279970284, 0, 2147458492)
---Type <return> to continue, or q <return> to quit---
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:857
#8  0x00020b8d in update_file (file=0x7f5702e0, depth=10, 2136408800, 10)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:463
#9  0x0002150a in check_dep (file=<value optimized out>, depth=10,
    this_mtime=1279970310,
    must_make_ptr=0x7fff9e6c, 2136408800, 9, 1279970310, 0, 2147458668)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:857
#10 0x00020b8d in update_file (file=0x7f570330, depth=8, 2136408880, 8)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:463
#11 0x0002150a in check_dep (file=<value optimized out>, depth=8,
this_mtime=1, must_make_ptr=0x7fff9f1c, 2136408880, 7, 1, 0, 2147458844)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:857
#12 0x00020b8d in update_file (file=0x7f59fdd0, depth=6, 2136604112, 6)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:463
#13 0x0002150a in check_dep (file=<value optimized out>, depth=6,
this_mtime=1, must_make_ptr=0x7fff9fcc, 2136604112, 5, 1, 0, 2147459020)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:857
#14 0x00020b8d in update_file (file=0x7f59fd30, depth=4, 2136603952, 4)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:463
#15 0x0002150a in check_dep (file=<value optimized out>, depth=4,
this_mtime=1, must_make_ptr=0x7fffa07c, 2136603952, 3, 1, 0, 2147459196)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:857
#16 0x00020b8d in update_file (file=0x7f4ddbf0, depth=2, 2135809008, 2)
---Type <return> to continue, or q <return> to quit---
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:463
#17 0x0002150a in check_dep (file=<value optimized out>, depth=2,
this_mtime=1, must_make_ptr=0x7fffa12c, 2135809008, 1, 1, 0, 2147459372)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:857
#18 0x00020b8d in update_file (file=0x7f5221a0, depth=0, 2136088992, 0)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:463
#19 0x00021858 in update_goal_chain (goals=0x7f4015a0,
    makefiles=0, 2136015744, 0)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/remake.c:157
#20 0x0001c5b5 in main (argc=91, argv=0x7fffd284,
    envp=0x7fffd3f4, 91, 2147472004, 2147472372)
    at /usr/src/tools/gmake/../../gnu/dist/gmake/main.c:1946
(gdb) print/x $r6
$2 = 0x7f5ffff0
(gdb)

Anything else I can do that will help?

        Johnny

--
Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt%softjar.se@localhost             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


Home | Main Index | Thread Index | Old Index