-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
backport-requiredbuggood first issueGood if you want to help but you do not know the project wellGood if you want to help but you do not know the project well
Description
I was using IPython to do some quick poc work that time, first I switched
context.archto'amd64'and assembledcdqeand then I suddenly would like to try what if I assemblecdqein 32-bit mode. So I switchedcontext.archback to'i386'and wanted to assemble, only to find an error:AttributeError: Invalid arch/bits combination: i386/64
Pwntools may can not handle context.arch correctly, it could change context.bits accordingly when first setting it. However, when setting context.arch the second time, context.bits left unchanged. I guess this bug is related to self._tls?
poc:
one more poc:
from pwn import *
print(f"{context.arch}/{context.bits}")
context.arch = 'amd64'
print(f"{context.arch}/{context.bits}")
context.arch = 'i386'
print(f"{context.arch}/{context.bits}")Metadata
Metadata
Assignees
Labels
backport-requiredbuggood first issueGood if you want to help but you do not know the project wellGood if you want to help but you do not know the project well
