Fix another segfault in strtr
Summary:
The Wu-Manber implementation in `strtr` used `qsort_r` on a collection of
`std::string`s. However, the C++ standard clearly says that `qsort`'s behavior
is undefined with non-trivial collection elements. `std::string` is not
trivial. While `qsort_r` is not part of the C++ standard, it's behavior should
not be expected to be defined with non-trivial types either.
See http://en.cppreference.com/w/cpp/algorithm/qsort
This change replaces `qsort_r` usage with `std::sort`.
Closes https://github.com/facebook/hhvm/pull/6767
Reviewed By: sgolemon, JoelMarcey
Differential Revision:
D2843994
Pulled By: sgolemon
fb-gh-sync-id:
c3b84b34156b7cf3202ea9176bd6873da5056f92