[C ++] memory Protection

Source: Internet
Author: User

Does C ++ have memory protection? Actually:

Http://en.wikipedia.org/wiki/Buffer_overflow_protection

This can only protect the buffer on the stack, but it is already very useful.

The probability of writing callstack out of bounds is much lower.

Reminder: If callstack does not have valid information, it is more likely that the Environment version does not match. It is rare to write down callstack.

In addition, use the LDD command to check whether the environments of the two machines are consistent. Note that the shared library address:

LDD httpd
Libz. so.1 =>/usr/lib64/libz. so.1 (0x00000033f7e00000)
Libm. so.6 =>/lib64/libm. so.6 (0x00000033f7200000)

LDD httpd
Libz. so.1 =>/usr/lib64/libz. so.1 (0x0000003b2cc00000)
Libm. so.6 =>/lib64/libm. so.6 (0x0000003b2c400000)

If the dynamic library loading addresses of the two machines are inconsistent, the core file cannot be debugged across machines.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.