NULL reference gives kernel panic

Marcus Comstedt <[email protected]>
Newsgroups gmane.os.netbsd.ports.sh3
Message-ID <[email protected]>
This is probably a feature of the new pmap code.  If a NULL pointer is
dereferenced from user code, you don't get a normal segfault, but
instead the kernel panics!

Reproduction recipe:

% cat > bomb.s

        mov #0,r0
        mov.b @r0,r0
        rts
        nop

% as -o bomb.o bomb.s
% ld -m shlunx -o bomb bomb.o
% ./bomb
panic: kernel debugging assertion "((((int)va < 0) && (pmap == pmap_kernel())) || (((int)va > 0) && (pmap != pmap_kernel()))) && va != 0" failed: file "../../../../arch/sh3/sh3/pmap.c", line 876

Stopped in pid 177 (bomb) at    0x8c0bbd36:     mov     r14,r15
db>


  // Marcus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.