Problem with debugging -m32 program
U.Mutlu
um@mutluit.com
Wed Jul 11 10:14:00 GMT 2018
Mahmood Naderan via gcc-help wrote on 07/11/2018 08:57 AM:
>> Sorry, I don't get your point.
>> What else do you expect to happen?
>
>
> I don't expect a crash. Why? because the strcpy should simply copy an item to memory location. I wonder why it says "I can not access the memory location where is memory location is the data value"?!!!
> Why on earth strcpy wants to access a memory location where I didn't tell him to access?
Just a guess: because after strcpy has overwritten the stack, the
(internal/hidden) register restorations now point to illegal addresses...?
> Moreover, as I said multiple times, why w/o specifying -m32, the program finishes without error?
People told you that there is a difference in 64bit/32bit stack layout...
More information about the Gcc-help
mailing list