reset password
Author Message
aarontrefler
Posts: 4
Posted 15:10 Apr 27, 2016 |

I am having difficulty pushing 3 values onto the stack.

Using your example from slide 40 of lecture 5, if I add an additional push statement (e.g., "push 1") before the call to "add_arguments" I receive the following error during runtime: "Segmentation fault (core dumped)".

Is this perhaps caused by the "printf" function?

Thanks in advance,

jhurley
Posts: 207
Posted 15:39 Apr 27, 2016 |

Check the code in the method where you get the values from the stack.  Make sure the addresses are 8 bytes apart (if using 64 bit registers whose names start with r) or 4 bytes apart (if using the 32 bit registers whose names start with e).  If that does not work, email me your code