Skip to content

Crash when emulating mipsel32 #2137

Open
@graviis

Description

@graviis

Hi, this sample crashes when using latest dev 2.1.4.dev11+g820a18bb :

from unicorn import *
from unicorn.mips_const import *

# 1C 00 40 54    bnel $v0, $zero, 0x74
# E8 00 C4 AF    sw   $a0, 0xe8($fp)
CODE = b'\x1c\x00@T\xe8\x00\xc4\xaf'

# Memory constants
ADDRESS = 0x10000
MEM_SIZE = 0x1000

uc = Uc(UC_ARCH_MIPS, UC_MODE_MIPS32 + UC_MODE_LITTLE_ENDIAN)
uc.mem_map(ADDRESS, MEM_SIZE)
uc.mem_write(ADDRESS, CODE)
uc.emu_start(ADDRESS, ADDRESS + len(CODE))

It is minimized from a ld-uClibc segfaulting in Qiling.
Issue 2134 does not crash however.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions