Re: [PATCH] D85231: Protect against filenames with no extension at all.

2020-08-04 Thread Eric Christopher via cfe-commits
Could maybe add an assert along with the patch as well as an assert only test? On Tue, Aug 4, 2020, 1:42 PM Sterling Augustine via Phabricator < revi...@reviews.llvm.org> wrote: > saugustine added a comment. > > The darwin-dsymutil.c tests this code path right now on line 33. I found > this error

[PATCH] D85231: Protect against filenames with no extension at all.

2020-08-04 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine added a comment. The darwin-dsymutil.c tests this code path right now on line 33. I found this error by running it under asan; otherwise it was fully latent. It seems pretty clear to me that when End == -1 (StringRef::npos), creating a string ref from that is obviously a bug. I'm no

[PATCH] D85231: Protect against filenames with no extension at all.

2020-08-04 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added a comment. Can you add a test that exercises this code path? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85231/new/ https://reviews.llvm.org/D85231 ___ cfe-commits mailing list cfe-c

[PATCH] D85231: Protect against filenames with no extension at all.

2020-08-04 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine created this revision. saugustine added a reviewer: echristo. Herald added a reviewer: JDevlieghere. Herald added a project: clang. Herald added a subscriber: cfe-commits. saugustine requested review of this revision. Such as the one in the darwin-dsymutil.c test. Repository: rG LLV