2 ms·
This is exactly what C++ name mangling does. The problem is that introducing it is itself an ABI break.
by int_19h 5y ago
This is exactly what C++ name mangling does. The problem is that introducing it is itself an ABI break.
- account42 5y agoAlmost, C++ name mangling does not include the return type even though it is ABI-relevant.
- noobermin 5y agoThat's specifically one of the examples they gave in the video the article references at the top. It wouldn't be breaking ABI if the symbol differs because that is the "correct" API breakage, one that callers have to be aware of, will generate an error when the application tries to load the shared library and does not find the matching symbol. The entire issue is when things change on the binary level but the application is not aware of it, and continues a subroutine call with wrong arguments or misinterprets the return value. Also, as the video states, the issue can happen even if the type of one of the arguments is the same but the fields in the type are rearranged, leading to a different offset during derreferencing.