qilingframework / qiling

A True Instrumentable Binary Emulation Framework
https://qiling.io
GNU General Public License v2.0
5.14k stars 744 forks source link

Check for mapped address #291

Closed 0xPhoeniX closed 4 years ago

0xPhoeniX commented 4 years ago

https://github.com/qilingframework/qiling/blob/617bcee20c77c8940dcd9aaf867e9b27a4054812/qiling/os/posix/syscall/mman.py#L204

Hey, any reason for not using if mmap2_addr != 0 and ql.mem.is_mapped(mmap2_addr, mmap2_length) ?

xwings commented 4 years ago

could be just ql.mem.is_mapped comes way after the original mmap.

please trow in a PR, thanks !

0xPhoeniX commented 4 years ago

I've added PR.

xwings commented 4 years ago

there are two same PR. both is yours ?

0xPhoeniX commented 4 years ago

No.

xwings commented 4 years ago

its ok. i am blind