Foxhound: fixing memory leaks and crashes #208
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The fix to clean up all the StringTaint from Nursery strings wasn't quite thorough enough and left some dangling pointers lying around. This fix makes sure we catch all the Nursery allocated Strings by moving String registration to Allocator-inl.h
This fix revealed the root cause of the segmentation faults which were occuring on client-heavy webapps (UI5 I'm looking at you). There were a couple of occasions where strings were being created (but not rooted) and then additional strings constructed for TaintOperation arguments (e.g. JSONParser.cpp and RegExp.cpp). As the TaintOperations were trying to allocate memory, this could cause a GC which would clean up the original strings.
This fix makes sure that the TaintOperations are created before the new Strings or that they are properly rooted.