Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assembler segfaults because it doesn't reserve enough memory #238

Open
Detry322 opened this issue May 8, 2017 · 3 comments
Open

Assembler segfaults because it doesn't reserve enough memory #238

Detry322 opened this issue May 8, 2017 · 3 comments

Comments

@Detry322
Copy link

Detry322 commented May 8, 2017

I don't have a minimal bug reproducing program, but when doing something of the form:

x64asm::Function function;
x64asm::Assembler assembler;

assembler.start(function);

// ... lots of assembly here, mov for me seemed to trigger the segfault ...
assembler.mov(r10, Imm64{10L});

assembler.finish();

cout << function << endl;

Given enough instructions, this program will segfault. Maybe this is because the implementations used to write instructions don't call the reserve method?

@eschkufz
Copy link
Contributor

eschkufz commented May 8, 2017 via email

@yasyf
Copy link

yasyf commented May 8, 2017

@eschkufz maybe worth it to add to the documentation? we can do a PR

@stefanheule
Copy link
Member

Yeah, we'd be happy to accept a PR to add this to the documentation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants