Please sign in to comment.
Making Rtags build with libc2.5 and some bug fixes
For unspeakable reasons I need to be able to build and run rtags in a libc2.5 environment. The mkstemps symbol does not exist in libc2.5, but the suffix isn't actually necessary so we can use mkstemp which does exist. In the process of using rtags, I noticed that some options (specifically --socket-address in my case) were failing with parser errors although they parsed fine in newer libcs: ``` $ ./rc --socket-address 127.0.0.1:123 invalid --socket-address 127.0.0.1:123 Try 'rc --help' for more information. ``` In investigating why, I found a case of undefined behavior: we were accessing an std::string that we had moved out of. The reason it works in newer libcs was because the small string optimization was hiding it - in most cases that move was actually a copy. When we use a long domain name, we get the same parsing issue in modern libcs: ``` $ ./rc --socket-address really-long-domain-name:123 invalid --socket-address really-long-domain-name:123 Try 'rc --help' for more information. ``` Fixes #1114 Also added `group: deprecated-2017Q4` - our travis does not seem to work with the latest trusty image. I went through RClient.cpp and fixed a few spots where we have the same issue.
- Loading branch information...
Showing with 13 additions and 12 deletions.