Skip to content

Investigate crash on vfs_write #39

@Dcraftbg

Description

@Dcraftbg

It crashes when accessing inode->ops->write with NULL pointer which makes me believe that ops might be some bogus value that isn't initialised in one of our drviers.

Happens during running of doomgeneric and/or miniterm.

Most likely miniterm as its the only one calling write() directly, presumably master is something bogus. It might be that master for some reason got cleaned up prematurely. This ptty system is kind of bad anyway. I'm not entirely sure however.

Crash stacktrace:
inode_write
syscall_base (sys_write)

Disassembly inode_write at ffffffff80000f14. (rax is some bogus value 0x0125012501250125, rdi is FFFF800000D8B040):
ffffffff80000f10 <inode_write>:
ffffffff80000f10: 48 8b 47 28 mov rax,QWORD PTR [rdi+0x28]
ffffffff80000f14: 48 8b 40 20 mov rax,QWORD PTR [rax+0x20]
ffffffff80000f18: 48 85 c0 test rax,rax
ffffffff80000f1b: 74 02 je ffffffff80000f1f <inode_write+0xf>
ffffffff80000f1d: ff e0 jmp rax
ffffffff80000f1f: 48 c7 c0 f9 ff ff ff mov rax,0xfffffffffffffff9
ffffffff80000f26: c3 ret
ffffffff80000f27: 66 0f 1f 84 00 00 00 nop WORD PTR [rax+rax*1+0x0]
ffffffff80000f2e: 00 00

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions