This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] Add early call handling to strlen interceptor
ClosedPublic

Authored by bruening on Apr 6 2016, 5:38 PM.

Details

Summary

The strlen interceptor is sometimes invoked too early for REAL(strlen) to
be initialized. A special check is added to use internal_strlen for this
situation.

Diff Detail

Event Timeline

bruening updated this revision to Diff 52875.Apr 6 2016, 5:38 PM
bruening retitled this revision from to [sanitizer] Add early call handling to strlen interceptor.
bruening updated this object.
bruening added a reviewer: dim.
bruening added subscribers: samsonov, llvm-commits.

I wonder if you could confirm that this fixes the failure you were seeing on FreeBSD?

dim accepted this revision.Apr 7 2016, 9:27 AM
dim edited edge metadata.

Yes, this fixes all the ASan tests which were broken on FreeBSD after rL263177. Tested on i386-freebsd11, amd64-freebsd11 (and even x86_64-darwin15 :) ) Thanks!

This revision is now accepted and ready to land.Apr 7 2016, 9:27 AM
dim added a comment.Apr 8 2016, 3:30 PM

@bruening, do you have commit access? Otherwise I'll commit it.

Yes, I committed it as r265705. Strange, it lists this page in the commit (http://reviews.llvm.org/rL265705), yet it didn't auto-close here -- did I not commit it in the right way?

dim closed this revision.Apr 8 2016, 4:03 PM

The commit message looks just fine to me, it includes the correct Differential Revision: header, as far as I can see. Let's just call it a fluke and close this review. :)

emaste added a subscriber: emaste.Apr 11 2016, 6:34 AM

Yes, I committed it as r265705. Strange, it lists this page in the commit (http://reviews.llvm.org/rL265705), yet it didn't auto-close here -- did I not commit it in the right way?

Phabricator only detects Differential Revision: at the end of the commit message. The Change-Id text after it in rL265705 is the reason it didn't auto-close.