Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crashes in GCC 4.x shared-libs builds, due to recent symbol visib…
…ility changes (#675) **Issue:** When building with GCC 4.8 and 4.9 and `-DBUILD_SHARED_LIBS=ON`, many tests were crashing. The crashes would say something like "free(): invalid pointer" and the stack trace would point into the c++ string headers. **Things we tried** - Crash stopped if we commented out the [recently-added line in CMakeLists.txt](https://github.com/awslabs/aws-crt-cpp/blob/80f4736126e14223a0c3882d3b734607143731f3/CMakeLists.txt#L305) line that sets `CXX_VISIBILITY_PRESET hidden`. So obviously symbol visibility has something to do with it. - We tried adding adding `AWS_CRT_CPP_API` to the templated `StlAllocator` class (see edfed14), which stopped GCC 4.x from crashing, but then the [Windows compiler didn't like that](https://github.com/awslabs/aws-crt-cpp/actions/runs/11636848409/job/32409003392#step:2:2373). **Description of Changes:** Don't set visibility to hidden for GCC < 5. That's how we had it before. GCC 4.x is very old. This isn't the first time it's disappointed us
- Loading branch information